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); }
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); }