Click here to Skip to main content
15,900,511 members
Home / Discussions / C#
   

C#

 
GeneralTrouble with 'set' accessor Pin
mikeirwin1-Sep-03 20:01
mikeirwin1-Sep-03 20:01 
GeneralRe: Trouble with 'set' accessor Pin
Ista2-Sep-03 7:01
Ista2-Sep-03 7:01 
GeneralRe: Trouble with 'set' accessor Pin
mikeirwin2-Sep-03 9:21
mikeirwin2-Sep-03 9:21 
GeneralWriting and reading binary data Pin
padcom131-Sep-03 14:53
padcom131-Sep-03 14:53 
GeneralRe: Writing and reading binary data Pin
James T. Johnson1-Sep-03 16:57
James T. Johnson1-Sep-03 16:57 
GeneralRe: Writing and reading binary data Pin
James T. Johnson1-Sep-03 17:08
James T. Johnson1-Sep-03 17:08 
GeneralRe: Writing and reading binary data Pin
padcom132-Sep-03 5:01
padcom132-Sep-03 5:01 
GeneralRe: Writing and reading binary data Pin
Eric Gunnerson (msft)2-Sep-03 9:48
Eric Gunnerson (msft)2-Sep-03 9:48 
Matthias,

If you want to do it the old way, you can define a structure that mirrors what you want, and then use unsafe to copy the data from a byte array to the struct:

MyStruct myStruct;

byte[] data = readdata(sizeof(myStruct));

fixed (byte* pData = data)
{
myStruct = *((MyStruct*) pData);
}

This will require unsafe code and full trust when you execute, and works only if you don't have any reference types (like strings or arrays) within the struct.
QuestionHow to call a form using reflection Pin
Ista1-Sep-03 14:20
Ista1-Sep-03 14:20 
AnswerRe: How to call a form using reflection Pin
James T. Johnson1-Sep-03 16:35
James T. Johnson1-Sep-03 16:35 
GeneralRe: How to call a form using reflection Pin
leppie1-Sep-03 18:50
leppie1-Sep-03 18:50 
GeneralRe: How to call a form using reflection Pin
James T. Johnson2-Sep-03 2:28
James T. Johnson2-Sep-03 2:28 
GeneralRe: How to call a form using reflection Pin
leppie2-Sep-03 7:08
leppie2-Sep-03 7:08 
QuestionIterate through class properties? Pin
vedbu1-Sep-03 13:33
vedbu1-Sep-03 13:33 
AnswerRe: Iterate through class properties? Pin
Ista1-Sep-03 14:14
Ista1-Sep-03 14:14 
AnswerRe: Iterate through class properties? Pin
Jim Stewart1-Sep-03 15:44
Jim Stewart1-Sep-03 15:44 
GeneralRe: Iterate through class properties? Pin
vedbu2-Sep-03 13:26
vedbu2-Sep-03 13:26 
QuestionAbout getting the decimal ASCII codes of the characters??? Pin
cemlouis1-Sep-03 12:13
cemlouis1-Sep-03 12:13 
AnswerRe: About getting the decimal ASCII codes of the characters??? Pin
leppie1-Sep-03 13:03
leppie1-Sep-03 13:03 
GeneralRe: About getting the decimal ASCII codes of the characters??? Pin
cemlouis2-Sep-03 6:10
cemlouis2-Sep-03 6:10 
QuestionHow to communicate a aspx page with a thread ( one thread per session )? Pin
zoltix1-Sep-03 11:48
zoltix1-Sep-03 11:48 
Questionhow to detect DbClick on a Row in DataGrid Pin
Anonymous1-Sep-03 8:27
Anonymous1-Sep-03 8:27 
AnswerRe: how to detect DbClick on a Row in DataGrid Pin
MeisterBiber1-Sep-03 9:19
MeisterBiber1-Sep-03 9:19 
GeneralValidate a form Pin
nico1931-Sep-03 6:10
nico1931-Sep-03 6:10 
QuestionHow fast is .NET? Pin
Cristoff1-Sep-03 5:46
Cristoff1-Sep-03 5:46 

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.