2 Replies
Is it absolutely wrong to do it like so?
I'll be using this instead
The first version is definitely not ideal, you have a shadowed property, and this would also be prone to boxing in case T is a value type
Second option definitely looks better
Although I'm not sure when you would need an object as the Data opposed to the T itself
There's a bunch of result implementations out there you can just use as well