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

C#

 
GeneralRe: Combobox with datasource doesn't sort correctly after adding a record Pin
rpfEYNMAN10-May-10 10:00
rpfEYNMAN10-May-10 10:00 
QuestionDataGridView <-> PropertyGrid data binding Pin
rbuchana10-May-10 7:46
rbuchana10-May-10 7:46 
Questionsave a TreeView in database [modified] Pin
reza assar10-May-10 5:59
reza assar10-May-10 5:59 
AnswerRe: save a TreeView in database Pin
Michel Godfroid10-May-10 6:32
Michel Godfroid10-May-10 6:32 
AnswerRe: save a TreeView in database Pin
Pete O'Hanlon10-May-10 9:28
mvePete O'Hanlon10-May-10 9:28 
AnswerRe: save a TreeView in database Pin
Alex Manolescu10-May-10 10:31
Alex Manolescu10-May-10 10:31 
Questionsum calculated with the formula crystal report Pin
koncuk10-May-10 5:32
koncuk10-May-10 5:32 
QuestionWhat is the alternative to memcpy in C#? Pin
Abdulaziz M Zaben10-May-10 4:17
Abdulaziz M Zaben10-May-10 4:17 
Hi

I have two pieces of software communicating over a TCP/IP, one is written in MFC and the other one in C#.In MFC I use memcpy to copy the hole structures to a byte array and send it to the other software, and when receiving data in MFC I use memcpy as well to align each bit to its variable

example


typedef struct<br />
{<br />
	unsigned int ID;<br />
	unsigned int SequenceNumber;<br />
	unsigned int ReferenceSeqNumber;<br />
} HeaderType;<br />
<br />
HeaderType header;<br />
<br />
memcpy(&header,&byteArray,sizeof(HeaderType));




but in C# I have no clue how to do this, and if not possible, then what is the best way to extract these variables?

Thanks in advance

Abdulaziz
AnswerRe: What is the alternative to memcpy in C#? Pin
Matt U.10-May-10 4:41
Matt U.10-May-10 4:41 
AnswerRe: What is the alternative to memcpy in C#? Pin
Peace ON10-May-10 4:41
Peace ON10-May-10 4:41 
AnswerRe: What is the alternative to memcpy in C#? Pin
Abdulaziz M Zaben10-May-10 4:56
Abdulaziz M Zaben10-May-10 4:56 
QuestionHow to work on Mobile Banking(SMS Banking)? Pin
CoderForEver10-May-10 2:40
CoderForEver10-May-10 2:40 
AnswerRe: How to work on Mobile Banking(SMS Banking)? Pin
Michel Godfroid10-May-10 3:59
Michel Godfroid10-May-10 3:59 
AnswerRe: How to work on Mobile Banking(SMS Banking)? Pin
CoderForEver10-May-10 4:18
CoderForEver10-May-10 4:18 
GeneralRe: How to work on Mobile Banking(SMS Banking)? Pin
Michel Godfroid10-May-10 5:10
Michel Godfroid10-May-10 5:10 
GeneralRe: How to work on Mobile Banking(SMS Banking)? Pin
CoderForEver10-May-10 7:24
CoderForEver10-May-10 7:24 
GeneralRe: How to work on Mobile Banking(SMS Banking)? Pin
Michel Godfroid10-May-10 11:15
Michel Godfroid10-May-10 11:15 
GeneralRe: How to work on Mobile Banking(SMS Banking)? Pin
CoderForEver20-May-10 7:38
CoderForEver20-May-10 7:38 
QuestionDataGridView and Deleting Rows Pin
Member 368144310-May-10 2:09
Member 368144310-May-10 2:09 
AnswerRe: DataGridView and Deleting Rows Pin
Heinzzy10-May-10 2:25
Heinzzy10-May-10 2:25 
AnswerRe: DataGridView and Deleting Rows Pin
Luc Pattyn10-May-10 2:32
sitebuilderLuc Pattyn10-May-10 2:32 
Questionsort by Pin
tanzeel8510-May-10 2:02
tanzeel8510-May-10 2:02 
AnswerRe: sort by Pin
Henry Minute10-May-10 5:27
Henry Minute10-May-10 5:27 
GeneralRe: sort by Pin
tanzeel8513-May-10 1:11
tanzeel8513-May-10 1:11 
AnswerRe: sort by Pin
Peace ON10-May-10 20:12
Peace ON10-May-10 20:12 

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.