Пример #1
0
 public int fwrite <T>(T obj) where T : struct
 {
     try
     {
         FILEExt.WriteVariable(ref fs, obj);
         return(1);
     }
     catch (System.Exception ex) { return(-1); }
 }
Пример #2
0
 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);
     }
 }