-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Akshit56491
Message 2 in Discussion

  clsRegistry reg = new clsRegistry(); //create new instance of clsRegistry class




        /*========= WORKING WITH STRING VALUES =========*/
        Console.WriteLine ("/*========= WORKING WITH STRING VALUES =========*/");
        // Set string value
        Console.WriteLine ("SET");
        reg.SetStringValue (
                Registry.LocalMachine,
                " 
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion ",
                "myStringValue",
                "Mama, I've just set a string value :-)"
                );
        if (reg.strRegError == null)
                Console.WriteLine ("\"myStringValue\" has been successfully set");
        else
                Console.WriteLine ( "Error: " + reg.strRegError );

        // Get string value
        Console.WriteLine ("GET");
        string strValue = reg.GetStringValue (
                Registry.LocalMachine,
                "SOFTWARE\\RegClassTest",
                "myStringValue"
                );
        if (reg.strRegError == null)
                Console.WriteLine ("myStringValue = \"{0}\"", strValue);
        else
                Console.WriteLine ( "Error: " + reg.strRegError );




        Console.WriteLine ("\npress return to exit");
        Console.ReadLine ();
   Try this code.   Regards, Akshit

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to