object reference not set to an instance of an object
-
Hi every one , It's really get's on my nerve :(( ,I didn't get the problem with my code,please help.
Int32 i = Convert.ToInt32(lblmnum.Text);
Int32 j = Convert.ToInt32(lbljnum.Text);
Process[i][j] = Convert.ToInt32(txttimep.Text);and I define the array before :
int[][] Process= new int[100][];
thank you all in advance
-
Hi every one , It's really get's on my nerve :(( ,I didn't get the problem with my code,please help.
Int32 i = Convert.ToInt32(lblmnum.Text);
Int32 j = Convert.ToInt32(lbljnum.Text);
Process[i][j] = Convert.ToInt32(txttimep.Text);and I define the array before :
int[][] Process= new int[100][];
thank you all in advance
It looks like the second dimension of your int32 array isn't defined, so what do you expect? A two dimensional array is an array of arrays. You've declared an array with a hundred slots containing arrays with an unspecified array length. Regards, Manfred
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
Me, 2012-05-24
-
It looks like the second dimension of your int32 array isn't defined, so what do you expect? A two dimensional array is an array of arrays. You've declared an array with a hundred slots containing arrays with an unspecified array length. Regards, Manfred
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
Me, 2012-05-24
-
Hi every one , It's really get's on my nerve :(( ,I didn't get the problem with my code,please help.
Int32 i = Convert.ToInt32(lblmnum.Text);
Int32 j = Convert.ToInt32(lbljnum.Text);
Process[i][j] = Convert.ToInt32(txttimep.Text);and I define the array before :
int[][] Process= new int[100][];
thank you all in advance
Try This and then use
Initialize array
Int32[,] Process = new Int32[5,5];Int32 i = Convert.ToInt32("1");
Int32 j = Convert.ToInt32("1");
Process[i,j] = Convert.ToInt32("45"); -
thank you so much,I'm new in c#. at first I try to define it as simple as c. :-D it works thanks.
You're welcome!
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
Me, 2012-05-24