public int fwrite <T>(T obj) where T : struct { try { FILEExt.WriteVariable(ref fs, obj); return(1); } catch (System.Exception ex) { return(-1); } }
public int fread <T>(Action <T> obj) where T : struct { try { obj(FILEExt.ReadValue <T>(ref fs)); return(1); } catch (Exception ex) { Console.WriteLine(ex.ToString()); return(-1); } }