see this code:
ChooseGrade ChGrade = new ChooseGrade();
string GrCl = ChGrade.getGrCl().ToString(); // function getGrCl gets "public int[] grad_class=new int[2];" in ChooseGrade Class
MessageBox.Show(GrCl);
But I see in Messagebox this “System.Int32[]” instant container of grade_class Array.
Can you Help me?
GrCl in Show() is converted to String calling ToString () method. As this method of int [] returns string “System.Int32” you see exactly It. You ca to do in such way:
But It is better to use StringBuilder for such cases 🙂
Then you can call Show like that: