Structure Arrays?

Dec 12 2004 5:14 PM
In C I could create array's of structures and hardcode them. Sample code would be: struct { char letter; int value; } colors[20] = { { 'r', 0xFF0000 }, { 'g', 0x00FF00 }, { 'b', 0x0000FF } }; Just wondering how something like this would be done in C#? I know structures can be done in C# but I would have no clue how to hardcode them. Thanks again for any help.

Answers (2)