Adding an element to an array in C#

Wednesday, 26 September 2007

Posted by Sébastien Lachance with Comments (0)

It's probably the same thing in VB.NET but the example here is in C#.

   1: Address[] addresses = customer.AddressList;
   2:
   3: Array.Resize(ref addresses, addresses.Length + 1);
   4:
   5: addresses[addresses.Length - 1] = address;




blog comments powered by Disqus