Reputation: 405
I have a method with the following signature:
MyClass<T>?[] Convert<T>(T?[])
Is it possible to inform static analysis about the nullability state, so that if an element of the input array is not nullable, the resulting array elements will also not be nullable? This would help avoid warnings in the following code:
string[] arr = new[] {"1", "2"};
MyClass<string>[] result = Convert(arr);
Upvotes: 0
Views: 50