Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
is already listed in the interface list on type with different tuple element names, as.
The following sample generates CS8140:
// CS8140.cs (11,7)
interface I<T>
{
T GetValue();
}
interface I2 : I<(int c, int d)>
{
}
class C : I<(int a, int b)>, I2
{
public (int c, int d) GetValue()
{
return (1, 2);
}
}
Renaming the tuple element names to match the interface declaration corrects this error:
interface I<T>
{
T GetValue();
}
interface I2 : I<(int c, int d)>
{
}
class C : I<(int c, int d)>, I2
{
public (int c, int d) GetValue()
{
return (1, 2);
}
}
.NET feedback
.NET is an open source project. Select a link to provide feedback: