E
Elmar Jacobs
hi folk,
i try to initilize an arry of struct. but i become always the error msg
"Array initializers can only be used in avariable or field initializer." if
i try to define the _wordbook member.
the struct is
[c++]
public class CWordbook
{
protected struct wordEntry {
public int id;
public string text;
};
....
}
[/c++]
[c++]
public class CWordbook_eng: CWordbook
{
private wordEntry [] _wordbook = {
{3, @"hallo"},
{4. @"HALLO"}
}
......
}
[/c++]
do anybody know how i can supply the initalization value to the _wordbook
member?
thank's a lot,
elmar
}
i try to initilize an arry of struct. but i become always the error msg
"Array initializers can only be used in avariable or field initializer." if
i try to define the _wordbook member.
the struct is
[c++]
public class CWordbook
{
protected struct wordEntry {
public int id;
public string text;
};
....
}
[/c++]
[c++]
public class CWordbook_eng: CWordbook
{
private wordEntry [] _wordbook = {
{3, @"hallo"},
{4. @"HALLO"}
}
......
}
[/c++]
do anybody know how i can supply the initalization value to the _wordbook
member?
thank's a lot,
elmar
}