Hullo, I've been learning C# and I had a question. I'm creating a class, and I was writing the constructor. When I was assigning values to it's variables, I found that the compiler seems to take it both with and without the "this" keyword. Does it make a difference whether I use it or not?
[CODE=C#]public class Car
{
private float weight, gasTank;
public Car(float myWeight, float myGasTank)
{
this.weight = myWeight;
this.gasTank = myGasTank;
}[/CODE]
[CODE=C#]public class Car
{
private float weight, gasTank;
public Car(float myWeight, float myGasTank)
{
this.weight = myWeight;
this.gasTank = myGasTank;
}[/CODE]
Comment