C# Class ImplicitConversionCausedByVariance

Changed in VS 2010 In https://msdn.microsoft.com/en-us/library/vstudio/ee855831.aspx A new implicit conversion is added for generic interfaces and delegates such as IEnumerable{T} and Func{TResult}.
Type parameter T of IEnumerable{T} has been covariant since .NET 4 (VS 2010). s; IEnumerable x = s; // OK in all versions. IEnumerable is inherited from IEnumerable. IEnumerable y = s; // OK in .NET 4 or later. string is inherited from object, so IEnumerable can be treated like a subtype of IEnumerable because of covariance. ]]>
Mostrar archivo Open project: ufcpp/UfcppSample

Public Methods

Method Description
Test ( IEnumerable e ) : void
Test ( IEnumerable e ) : void

Private Methods

Method Description
Main ( string args ) : void

Method Details

Test() public static method

public static Test ( IEnumerable e ) : void
e IEnumerable
return void

Test() public static method

public static Test ( IEnumerable e ) : void
e IEnumerable
return void