TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ranandar
NA
9
0
Question Converting nested C structure to C# Is this possible?
Dec 1 2008 5:45 PM
I have a struct written in C that I want to use in C#. It uses an array of structures nested inside of another structure. This is very straightforward in C but I have been unsuccessful in duplicating this simple example. Is this even possible using C#? If it is not possible what other options do I have?
Here is the C code simplified. The actual structure is much more complex.
// -- Message File Structure --
struct message_struct{ // Message Structure
char mname[20]; // Message Name
char mattr; // Message Slot Used flag
struct { // Page // Page Structure
int duration; // Duration
char stext[201]; // Scroll Buffer
struct { // Line // Line Structure
char csize; // Char Size
char mchar[31]; // Line Characters
} mline[8]; // # of Lines
} mpage[10]; // # of Pages
} message;
Then to access the structure
message.mpage[0].mline[0].mchar[0] = 'A';
Reply
Answers (
7
)
Working with files - How to choose?
Regarding DropDown in Grid of C#.Net