Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: replace text in a byte[] Pin
Nick Parker12-Apr-05 9:39
protectorNick Parker12-Apr-05 9:39 
GeneralRe: replace text in a byte[] Pin
Ian Bowler12-Apr-05 9:47
Ian Bowler12-Apr-05 9:47 
GeneralLogin to Yahoo network Pin
ldself12-Apr-05 7:26
ldself12-Apr-05 7:26 
Generalformating datagrid Pin
la vie12-Apr-05 5:57
la vie12-Apr-05 5:57 
GeneralRe: formating datagrid Pin
MoustafaS12-Apr-05 14:17
MoustafaS12-Apr-05 14:17 
GeneralC# for Pocket PC Pin
Vitor Hugo Barros12-Apr-05 5:57
Vitor Hugo Barros12-Apr-05 5:57 
GeneralC# RegistryKey and GetType Pin
Brigg Thorp12-Apr-05 5:38
Brigg Thorp12-Apr-05 5:38 
GeneralRe: C# RegistryKey and GetType Pin
Ian Bowler12-Apr-05 7:36
Ian Bowler12-Apr-05 7:36 
If you get a registry value that is REG_SZ, the GetType() method will return System.String. For REG_DWORD values it returns System.Int32. For REG_BINARY values it returns System.Byte[]. You can compare against these values. You might be able to use the "is" keyword as follows:

if(myRegValue is System.String)...

If that doesn't work (it's been a while since I've needed to do this) you can always fall back on a string compare:

if(myRegValue.GetType().ToString() == "System.String")...

I think the first way should work though...

Hope that helps.

Regards,

Ian
GeneralRe: C# RegistryKey and GetType Pin
Brigg Thorp12-Apr-05 9:21
Brigg Thorp12-Apr-05 9:21 
GeneralRe: C# RegistryKey and GetType Pin
Dave Kreskowiak12-Apr-05 7:52
mveDave Kreskowiak12-Apr-05 7:52 
GeneralRe: C# RegistryKey and GetType Pin
Brigg Thorp12-Apr-05 9:25
Brigg Thorp12-Apr-05 9:25 
QuestionCan i stop people from deleting a file? Pin
Anthony Mushrow12-Apr-05 5:37
professionalAnthony Mushrow12-Apr-05 5:37 
AnswerRe: Can i stop people from deleting a file? Pin
Dave Kreskowiak12-Apr-05 7:21
mveDave Kreskowiak12-Apr-05 7:21 
AnswerRe: Can i stop people from deleting a file? Pin
afinnell15-Apr-05 13:55
afinnell15-Apr-05 13:55 
GeneralC# COM Interop Pin
s2111979212-Apr-05 4:30
s2111979212-Apr-05 4:30 
GeneralMake an instance of a child form from a class file. Pin
Mike Jeferson12-Apr-05 4:23
Mike Jeferson12-Apr-05 4:23 
GeneralC# Connection to Northwind via SQL - HELP Pin
Jethro6312-Apr-05 4:08
Jethro6312-Apr-05 4:08 
GeneralRe: C# Connection to Northwind via SQL - HELP Pin
Luis Alonso Ramos12-Apr-05 6:34
Luis Alonso Ramos12-Apr-05 6:34 
GeneralRe: C# Connection to Northwind via SQL - HELP Pin
Jethro6312-Apr-05 15:59
Jethro6312-Apr-05 15:59 
GeneralRe: C# Connection to Northwind via SQL - HELP Pin
Dave Kreskowiak13-Apr-05 4:20
mveDave Kreskowiak13-Apr-05 4:20 
GeneralRe: C# Connection to Northwind via SQL - HELP Pin
Luis Alonso Ramos13-Apr-05 5:29
Luis Alonso Ramos13-Apr-05 5:29 
GeneralRe: C# Connection to Northwind via SQL - HELP Pin
Jethro6313-Apr-05 15:22
Jethro6313-Apr-05 15:22 
GeneralRe: C# Connection to Northwind via SQL - HELP Pin
Mushtaque Nizamani25-Oct-07 4:41
Mushtaque Nizamani25-Oct-07 4:41 
GeneralPainting Issue Pin
Mark_Harrison12-Apr-05 2:05
Mark_Harrison12-Apr-05 2:05 
GeneralRe: Painting Issue Pin
S. Senthil Kumar12-Apr-05 3:26
S. Senthil Kumar12-Apr-05 3:26 

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.