2
Answers

Structure Arrays?

kyle_hankinson

kyle_hankinson

19y
2.5k
1
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)