❔ initiating Constructor
Why cant I sometimes initiate data members in a constructor like this:
Public Car (int wheels, string color)
{
Wheels = wheels
Color = color
}
And only use
this.color = color
this.wheels = wheels
What is the difference? Why do we have use this at all?
Public Car (int wheels, string color)
{
Wheels = wheels
Color = color
}
And only use
this.color = color
this.wheels = wheels
What is the difference? Why do we have use this at all?