The type "MyObject" must be an unimaginable value type in order to use it as the "T" parameter in the generic type or "Nullable <T>" method
I am using .net framework 4.5
I get the following error
Error CS0453 The type "MyObject" must be an unimaginable value type in order to use it as the "T" parameter in the generic type or "Nullable" method
public async Task<Nullable<MyObject>> MyMethod(string myParamter) {}
I also tried
public async Task<MyObject?> MyMethod(string myParamter) {}
If I set the value as nullable, then why am I getting a red string under the method name with this error message
The stackflowflow answer package is simple, make the return type null, but for me, Visual Studio does not allow it.
+5