Let me be more specific by showing the following example:
public class Cat
{
public string Name { get; set; }
public string Color { get; set; }
public Cat()
{
Cat("Unamed", "gray");
}
public Cat(string name, string color)
{
Name = name;
Color = color;
}
public void SayMiau()
{
Console.WriteLine("Cat {0} says Miau!!!!!!!!!!", Name);
}
}
In the SayMiau Method I use the property Name instead of using the field name
as an argument inside the the class method.
Is there any difference?(computational cost?)
Is that considered a bad/good practice when I make method signatures for the same class?