public static bool Exists <T>(TypedFile <T> typedfile, TestDelegate <T> testDelegate) { typedfile.Reset(); while (!typedfile.Eof) { if (testDelegate(typedfile.Read())) { return(true); } } return(false); }
public static bool CheckForAll <T>(TypedFile <T> typedfile, TestDelegate <T> testDelegate) { typedfile.Reset(); while (!typedfile.Eof) { T t = typedfile.Read(); if (!testDelegate(t)) { return(false); } } return(true); }
public static T[] Read <T>(TypedFile <T> typedfile) { typedfile.Reset(); T[] record = new T[typedfile.FileSize]; int i = 0; //typedfile.Reset(); while (!typedfile.Eof) { record[i++] = typedfile.Read(); } return(record); }