C# ambiguity error when properties are used -
I have recently started learning C #. I just learned about the properties and decided to make them a simple program to understand them more. This is the code I wrote:
class dog {personal full weight; Private string color; Public string color {get; Set; } Public dog (int theWight, String the Clauer) {weight = theWight; Color = colorful; }}
And I get an ambiguity error as far as I understand, it should not be so.
You have area and property with the same name color
this is the reason The compiler produces an error
Comments
Post a Comment