Re: cannot implement both 'I<X>' and 'I<Y>' because they may unify for some type parameter substitutions....

Peter Ritchie <[email protected]> Wed, 26 Aug 2009 14:56:22 -0400
Newsgroups gmane.comp.windows.devel.dotnet.advanced
Message-ID <LISTSERV%[email protected]>
I may not be understanding what the problem is; but the following code co=
mpiles fine in VS 2008:
public interface I<T>
{
    void Method();=20=20=20=20
}
=20
public interface I2 : I<int>, I<double>
{
=20
}
=20
public class C :I2
{
    public void Method()
    {
        throw new NotImplementedException();
    }
}

...with warning level 4...
 

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives