V
Vidya Bhagwath
Hello Experts,
I am porting a c++ code into c#.There are 3 structures, as explained
below.
typedef struct
{
unsigned char ByteCount;
unsigned short RegVals[10];
} WRITE_INFO;
typedef struct
{
unsigned short VarAddress;
unsigned short data[256];
}USER_PASSED_INFO;
typedef struct
{
WRITE_INFO WriteRegInfo;
USER_PASSED_INFO UserPassedInfo;
}LINKINFO;
LINKINFO Info;
My code uses the memcpy in the following fashion.
memcpy(Info.WriteRegInfo.RegVals[2], &Info.UserPassedInfo.data[2],
Info.WriteRegInfo.ByteCount );
As I know there is no code for memcpy in the C#. So how can I port the
above code into the C#. I am new to C#. I don't know much regarding
the C#. So can anybody tell me how exactly I can implement the above
line of code in C#.
Thanks in Advance for any help.
Regards,
Vidya
I am porting a c++ code into c#.There are 3 structures, as explained
below.
typedef struct
{
unsigned char ByteCount;
unsigned short RegVals[10];
} WRITE_INFO;
typedef struct
{
unsigned short VarAddress;
unsigned short data[256];
}USER_PASSED_INFO;
typedef struct
{
WRITE_INFO WriteRegInfo;
USER_PASSED_INFO UserPassedInfo;
}LINKINFO;
LINKINFO Info;
My code uses the memcpy in the following fashion.
memcpy(Info.WriteRegInfo.RegVals[2], &Info.UserPassedInfo.data[2],
Info.WriteRegInfo.ByteCount );
As I know there is no code for memcpy in the C#. So how can I port the
above code into the C#. I am new to C#. I don't know much regarding
the C#. So can anybody tell me how exactly I can implement the above
line of code in C#.
Thanks in Advance for any help.
Regards,
Vidya