Yes, you need it in your code example. C# will always assume you mean local variable, so if a member variable and a local variable exist with the same name, you must use this
, otherwise it will be assumed that you are referring to the local variable.
In your code example, if you neglect the this
, you are effectively assigning name
(or alias
)'s value to itself (thus accomplishing nothing).