public static Matrix Load(string file)
{
if (File.Exists(file))
{
using (var fs = new FileStream(file, FileMode.Open))
using (var f = new StreamReader(fs))
using (var r = new JsonReader(f))
return r.ReadMatrix();
}
else
throw new InvalidOperationException("File not found");
}