A amit sinha Oct 26, 2006 #1 i need to a method where i add elements in array list and the method should be returning type..
B Bjorn Abelli Oct 26, 2006 #3 ... i need to a method where i add elements in array list and the method should be returning type.. Click to expand... I suppose you don't really mean an ArrayList, as that's contradictory to the subject line. If you want to create a method that returns a 2 dimensional array, that's easy... .... public int[,] MyMethod() { int[,] myArray = new int[10,10] /// Here you can elements to the array in any way you like... return myArray; } .... /// Bjorn A
... i need to a method where i add elements in array list and the method should be returning type.. Click to expand... I suppose you don't really mean an ArrayList, as that's contradictory to the subject line. If you want to create a method that returns a 2 dimensional array, that's easy... .... public int[,] MyMethod() { int[,] myArray = new int[10,10] /// Here you can elements to the array in any way you like... return myArray; } .... /// Bjorn A