Click here to Skip to main content
15,915,611 members
Home / Discussions / C#
   

C#

 
AnswerRe: force ToString() override in Deriv classed (already having a Base class) Pin
Keith Barrow8-Mar-10 4:01
professionalKeith Barrow8-Mar-10 4:01 
AnswerRe: force ToString() override in Deriv classed (already having a Base class) Pin
Not Active8-Mar-10 4:05
mentorNot Active8-Mar-10 4:05 
GeneralRe: force ToString() override in Deriv classed (already having a Base class) Pin
Keith Barrow8-Mar-10 4:13
professionalKeith Barrow8-Mar-10 4:13 
GeneralRe: force ToString() override in Deriv classed (already having a Base class) Pin
Not Active8-Mar-10 4:20
mentorNot Active8-Mar-10 4:20 
GeneralRe: force ToString() override in Deriv classed (already having a Base class) Pin
George Nistor8-Mar-10 6:49
George Nistor8-Mar-10 6:49 
GeneralRe: force ToString() override in Deriv classed (already having a Base class) Pin
Keith Barrow8-Mar-10 6:58
professionalKeith Barrow8-Mar-10 6:58 
GeneralRe: force ToString() override in Deriv classed (already having a Base class) Pin
George Nistor8-Mar-10 7:26
George Nistor8-Mar-10 7:26 
GeneralRe: force ToString() override in Deriv classed (already having a Base class) Pin
George Nistor8-Mar-10 7:34
George Nistor8-Mar-10 7:34 
AnswerRe: force ToString() override in Deriv classed (already having a Base class) Pin
PIEBALDconsult8-Mar-10 6:57
mvePIEBALDconsult8-Mar-10 6:57 
QuestionReturn Week Number of the Current Month Pin
codeproject_Tarun8-Mar-10 3:32
codeproject_Tarun8-Mar-10 3:32 
AnswerRe: Return Week Number of the Current Month Pin
kevinnicol8-Mar-10 3:46
kevinnicol8-Mar-10 3:46 
AnswerCross-post Pin
Kristian Sixhøj8-Mar-10 4:02
Kristian Sixhøj8-Mar-10 4:02 
QuestionRegarding deployment of windows service Pin
Håkan Axheim8-Mar-10 2:37
Håkan Axheim8-Mar-10 2:37 
AnswerMessage Closed Pin
8-Mar-10 4:00
stancrm8-Mar-10 4:00 
GeneralRe: Regarding deployment of windows service Pin
Håkan Axheim8-Mar-10 4:04
Håkan Axheim8-Mar-10 4:04 
GeneralMessage Closed Pin
8-Mar-10 4:13
stancrm8-Mar-10 4:13 
GeneralRe: Regarding deployment of windows service Pin
Håkan Axheim8-Mar-10 9:30
Håkan Axheim8-Mar-10 9:30 
QuestionSessionTimeOut Problem Pin
shaina22318-Mar-10 2:22
shaina22318-Mar-10 2:22 
AnswerRe: SessionTimeOut Problem Pin
Sandeep Mewara8-Mar-10 9:57
mveSandeep Mewara8-Mar-10 9:57 
QuestionReading and Writing Reg_Binary Pin
sriharichowdary8-Mar-10 2:10
sriharichowdary8-Mar-10 2:10 
AnswerRe: Reading and Writing Reg_Binary Pin
Covean8-Mar-10 2:34
Covean8-Mar-10 2:34 
AnswerRe: Reading and Writing Reg_Binary Pin
The Man from U.N.C.L.E.8-Mar-10 2:39
The Man from U.N.C.L.E.8-Mar-10 2:39 
Reading and writing values in the registry is the same regardless of the format. In the case of REG_BINARY the returned object is of type byte[]. The following code would convert that to a string. You would reverse the process to write it back.

C#
 RegistryKey regKey3 = Registry.CurrentUser;
RegistryKey regSub3 = regKey3.OpenSubKey("Software or whatever");
  
byte[] ans = (byte[])regSub3.GetValue("Value I need");
string sString = System.Text.Encoding.ASCII.GetString(ans);
string [] sArray = sString.Split('\0');
sString = "";
foreach (string s in sArray)
{
 sString += s;
}


Now sString should have your string from the reg_binary ready for processing.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
[My Articles]  [My Website]

QuestionProblem with Random class in C# Pin
yadlaprasad8-Mar-10 1:36
yadlaprasad8-Mar-10 1:36 
AnswerRe: Problem with Random class in C# Pin
Covean8-Mar-10 1:45
Covean8-Mar-10 1:45 
AnswerRe: Problem with Random class in C# Pin
Phil J Pearson8-Mar-10 1:47
Phil J Pearson8-Mar-10 1:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.