Seriosk
Programmer;
- Oct 29, 2016
- 256
- 105
The 'this.' qualifier is useless in this sense, I am not sure why coders continuously use it in the wrong way, maybe they think it gives their application a performance boost (LOL).So in command manager, this.Register("cmd", new Command()); should be Register("cmd", new Command()); ? Just asking if it true, I've done that and I wan't to know if that is true.
There are several usages of this keyword in C#.
To qualify members hidden by similar name
To have an object pass itself as a parameter to other methods
To have an object return itself from a method
To declare indexers
To declare extension methods
To pass parameters between constructors
To internally reassign value type (struct) value.
To invoke an extension method on the current instance
To cast itself to another type
To chain constructors defined in the same class