Q:

remove members of array of class

I have a class which contains an array of a second class just like this:
public class SimpayRecords
{
    public int a;
    public int b;
    public int c;
    public SimpayRecord[] records;
}

I have a third class which contains the SimpayRecords class. In this third class i want to loop through the array and remove unwanted items. Something like this:
for (int i = 0; i < this.Records.Records.Length; i++)
{
    if (this.Records.Records[i].Date < this.LastTime)
      //remove TempRecords.Records[i]
}

how can i do it?

A:

If you don't want to use List to store your data, you could use Extension method as shown in answer to this question
public static class ArrayExtensions{
     public static T[] RemoveAt<T>(this T[] source, int index)
     {
        T[] dest = new T[source.Length - 1];
        if( index > 0 )
            Array.Copy(source, 0, dest, 0, index);

        if( index < source.Length - 1 )
            Array.Copy(source, index + 1, dest, index, source.Length - index - 1);

        return dest;
     }
}

Then you can use RemoveAt method as following:
Foo[] bar = GetFoos();
bar = bar.RemoveAt(2);

Hope this helps

