How can we delegate an array
-
Assume an array in form1 like this public class ARR1 { public Int64 code; public string name; public bool sup; public bool[] chb = new bool[100]; public string[] param = new string[100]; public void reset() { int i; code = 0; name = ""; sup = false; for (i = 0; i < 100; i++) chb[i] = false; for (i = 0; i < 100; i++) param[i] = ""; } } public ARR1 MainArr = new ARR1(); and ofcourse we have done something with this aaray and it is full of data, in form2 its new data is not accessible. how can we delegate this array in form2 to use its data. this format ( form1 frm1=new form1(); ) doesn't work. thus how can we delegate an array in deferent forms?
-
Assume an array in form1 like this public class ARR1 { public Int64 code; public string name; public bool sup; public bool[] chb = new bool[100]; public string[] param = new string[100]; public void reset() { int i; code = 0; name = ""; sup = false; for (i = 0; i < 100; i++) chb[i] = false; for (i = 0; i < 100; i++) param[i] = ""; } } public ARR1 MainArr = new ARR1(); and ofcourse we have done something with this aaray and it is full of data, in form2 its new data is not accessible. how can we delegate this array in form2 to use its data. this format ( form1 frm1=new form1(); ) doesn't work. thus how can we delegate an array in deferent forms?
1. Please use the pre tags to post code (the code button on top of the edit field) 2. Your question does not make sense at all, what are you trying to achieve? 3. What do you mean with: "this format ( form1 frm1=new form1(); ) doesn't work" 4. What do you mean with delegate, because a delegate is a more complex term to explain and I doubt you need that here. I assume you mean something else. 5. You're code looks terrible, if you're a beginner, I suggest you buy a book and follow it from start to end.
V.
-
1. Please use the pre tags to post code (the code button on top of the edit field) 2. Your question does not make sense at all, what are you trying to achieve? 3. What do you mean with: "this format ( form1 frm1=new form1(); ) doesn't work" 4. What do you mean with delegate, because a delegate is a more complex term to explain and I doubt you need that here. I assume you mean something else. 5. You're code looks terrible, if you're a beginner, I suggest you buy a book and follow it from start to end.
V.
-
Ill do all your advices and forget my question. as we can delegate for example a textBoxes between forms, I want to know how can we delegate arrays between forms.