Consider the two arrays:
string[] str = new string[1];
str[0] = "str";
string[] str1 = new string[2];
str1[0] = "str1";
str1[1] = "str2";
To append an two arraycollections:
str = str.Concat(str1).ToArray(); //the result was stored in the str array. this will work only in .net 2008
To add new element in the array:
Array.Resize(ref str, newSize);
str[newSize-1] = "newvalue";
preserving Array elements using c#.net
Posted by
Nirmal
Thursday, October 30, 2008
0 comments:
Post a Comment