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
john ranella
1.6k
193
5.8k
Struct and array
Oct 30 2014 5:44 AM
hi,
i've this code
public class a
{
sa sa1 = new sa(0);
public void test ()
{
uint i, j;
for (i = 0; i <= 1; i += 1) {
for (j = 0; j <= 13; j += 1) {
sa1.va[i].vb[j] = false;
}
}
}
public struct sa
{
public sb[] va;
// other variable
public sa(uint i): this()
{
va = new sb[2];
}
}
public struct sb
{
public bool[] vb;
// other variable
public sb(uint i): this()
{
vb = new bool[14];
}
}
}
When i try to run void test i receive this error: ...Object reference not set to an instance of an object"
where am I doing wrong?
Reply
Answers (
1
)
How to retrieve twitter news feed by using c#?
how to save settings to registry