Exemple #1
0
 public bool TryGetCode(out int code, out string error)
 {
     code = SimpleTypeConverter.ParseInt32(StringValue, int.MinValue, int.MaxValue, out error);
     if (error != null)
     {
         code = (int)SimpleTypeConverter.ParseUInt32(StringValue, uint.MinValue, uint.MaxValue, out error);
     }
     return(error == null);
 }
Exemple #2
0
 public bool TryGetCode(out int code, [NotNullWhen(false)] out string?error)
 {
     code = SimpleTypeConverter.ParseInt32(StringValue, int.MinValue, int.MaxValue, out error);
     if (!(error is null))
     {
         code = (int)SimpleTypeConverter.ParseUInt32(StringValue, uint.MinValue, uint.MaxValue, out error);
     }
     return(error is null);
 }