Link to home
Start Free TrialLog in
Avatar of joshuadavidlee
joshuadavidlee

asked on

How do I delete an object from an array in c# 3.0 ?

i can't find a method in the intellisense like remove(object o) for example

Also I have a current reference to the object I want to remove
SOLUTION
Avatar of Ashish Patel
Ashish Patel
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of joshuadavidlee
joshuadavidlee

ASKER

i am aware of that but I am using System.IO alot and calling .GetDirectories() and .GetFiles() both of which return arrays[] and for other reasons I don't want to use ArrayList
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Copy the elements above the element you want to remove down one.  Use Array.Copy or Array.ConstrainedCopy.  Then Array.Resize if you wish.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial