I get following warning:
Possible ‘null’ assignment to an entity marked with ‘Value cannot be
null’ attribute
My code:
if (verifier.GetType().GetInterface(typeof(IAsyncVerifier).FullName, true) == null)
{
continue;
}
Warning given on typeof(IAsyncVerifier).FullName part. How that can be null? How would you fix it? Or maybe there is better way to figure if object implements specific interface?
Or maybe there is better way to figure if object implements specific interface?
Use is operator for to check if an object’s type is derived from a particular interface or class
Look at this MSDN article Type.FullName It says that property will return nothing.
If you are sure that when you access FullName this will not be null in any case you can disable this warning using
//resharper disablecomment