I'm new with .net(C#).
I need to write an application which gets objects from socket and display it on screen.
The other application which send the messages is not c# (it's c++ if it's matter)
The ICD of the objects is:
int id;
char name[20];
short rates[5]
int lastGrades[10];
- How can I define this object in c# ? (It seems that I cant define class with primitve array without using new operator)
I want to do somthing like that to get the message from socket and cast it to my MyObject class.
somthing like:
byte b[] = new byte[100];
socket.Recvive(b);
MyObject myObject = ???cast??? b;
- How can I do it ?