aewarnick Posted February 5, 2003 Posted February 5, 2003 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]; } Quote C#
aewarnick Posted February 5, 2003 Author Posted February 5, 2003 Nevermind! int[][]x = new int[6][]; should be: int[][]x = new int[3][]; Quote C#
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.