Hi all,
I want to define some this:
int m=5;
int [,] matrix=new int[4,m];
Is it possible?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Iftikar HussainPosted Aug 28, 2013, 2:16 AM
diamond diamondPosted Aug 28, 2013, 2:06 AM
{
public partial class Form1 : Form
{
int winc = 1;
int size = 4;
int [,] matrix= new int[4,size];
int [,] UDP_matrix = new int[4,size];
Iftikar HussainPosted Aug 28, 2013, 2:03 AM
diamond diamondPosted Aug 28, 2013, 2:01 AM
Error1A field initializer cannot reference the non-static field, method, or property 'test.Form1.size'
Iftikar HussainPosted Aug 28, 2013, 1:54 AM
diamond diamondPosted Aug 28, 2013, 1:32 AM
Iftikar HussainPosted Aug 27, 2013, 11:59 PM
Yes it is possible
Regards,
Iftikar