In C#, is “this” keyword required? [duplicate]

No, this is purely optional in almost all cases. The only reason it is required in your example is to disambiguate between local variables and parameters and member variables that happened to have the same identifier name.

You could avoid the use of this by renaming either the parameter or the field to something unique.

Leave a Comment