Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Error: Highlights the j loop and says, "Object reference not set to an instance of an object."

 

Help.

 

int[][]x = new int[6][];

x[0]=new int[] {1,2};

x[1]=new int[] {3,4,5};

x[2]=new int[] {6,7};

 

for (int i=0; i<x.Length; ++i)

for (int j=0; j<x.Length; ++j)

{

RTB1.Text+=" "+x.Length;

TB2.Text+=" "+x.Length;

TB1.Text+=x[j];

RTB2.Text+=x[j];

}

C#

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...