public static bool TryParse(string sha, out Sha1Id sha1, out string error) { error = null; try { sha1 = new Sha1Id(sha); return(true); } catch (Exception e) { error = e.Message; } sha1 = new Sha1Id(0, 0, 0); return(false); }