How can I create a string array in a struct?
i have developed something like this
struct menu
{
sMenuehaupt [] = new string sMenuehaupt[250]
}
but ist doesn't work.
its only possible to create a char array
How can I create a string array in a struct?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Feb 19, 2014, 6:30 AM EST
struct menu
This 'initialization' rule applies not only to string arrays but to any type of struct field.
Jignesh TrivediRank #16 · 50.3K reputationPosted Feb 19, 2014, 6:59 PM EST
Agree with vulpes...
but we can initialize array object when ever required..
struct menu
{
public string[] sMenuehaupt;
}
menu m = new menu();
m.sMenuehaupt = new string[] { "s", "s", "s" };
hope this will help you.