C# 클래스 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. ]]>
파일 보기 프로젝트 열기: ufcpp/UfcppSample

공개 메소드들

메소드 설명
Test ( IEnumerable e ) : void
Test ( IEnumerable e ) : void

비공개 메소드들

메소드 설명
Main ( string args ) : void

메소드 상세

Test() 공개 정적인 메소드

public static Test ( IEnumerable e ) : void
e IEnumerable
리턴 void

Test() 공개 정적인 메소드

public static Test ( IEnumerable e ) : void
e IEnumerable
리턴 void