I have a class Foo
with a function myName
in it.
Class bar
Inherits from Foo
and have a Property that is also called
We don't even need inheritance in the picture - you can't have "overloads" between a property and a method:
class Program
{
static void Main(string[] args)
{
Console.ReadLine();
}
void DoStuff(int i,int j)
{
}
int DoStuff { get { return 10; } }
}
Produces:
error CS0102: The type 'ConsoleApplication4.Program' already contains a definition for 'DoStuff'