Re:Using 'this' incorrectly in C#
by brundolf on Friday August 14, 2020 @11:54AM
(#24159545)
A field in the parent class is still a member of the current object, and I'm pretty sure there's no way "this." could make a difference there, right?
[ Parent
| on HN ]
You're correct that the presence or absence of a "this." shouldn't make a difference.
Having said that, C# also permits you to have fields with the same name in both the parent class and the current object.
This will give you a compiler warning suggesting you use the new keyword, though.