|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ConversionHow would I convert something like below to c# or VB.Net.
unsigned char ar[] = "AB"; unsigned int i = 0; i = *(unsigned int *)ar; Thanks JK >How would I convert something like below to c# or VB.Net. Well if it's the end result you want then you can simply do> > unsigned char ar[] = "AB"; > unsigned int i = 0; > i = *(unsigned int *)ar; Dim i As Integer = &H4241 As a bonus you get rid of the bug in the original code, which is a perfect example of how you can shoot yourself in the foot if you don't use pointers carefully. Mattias -- Mattias Sjögren [C# MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com Please reply only to the newsgroup.
Displaying info in status bar of main form
Label control questions; avoiding cut-off text IRDA with VB2005 VB2005 - Bound Date TextBox Issues DirectCast - Why is this not working? dropdownlist --> URL Inserting an image file in a datagrid view column- how AutoIdent Windows Service and App.Config problem is it possible to write to CD using win2000? |
|||||||||||||||||||||||