I would like to include several additional properties that extend the basic functionality, for example public bool Success { get; set; } or override ErrorCode to return an int instead. Is something like that possible?
I would like to include several additional properties that extend the basic functionality, for
Share
Nope you can’t extend the built-in types, but you can override the default error handling to use your own error handling.
But as an int is just a stricter string, I would personally leave it as-is and just use a helper extension method, e.g:
Then you can use it like: