this Keyword
You should use the "this" keyword when you want to refer to the instance itself
public class MyClass
{
private int _myInteger;
public MyClass()
{
this._myInteger = 20;
}
public int Method_Multiply(int value1)
{
return value1 * this._myInteger;
}
}
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext