3

I am reading msdn documentation for this keyword. They gave three usages for this keyword as follows

  1. To qualify members hidden by similar names
  2. To pass an object as a parameter to other methods
  3. To declare indexers

and there is no word about the usage of this during constructor chaining.

My question are :

  1. Why they missed out constructor chaining ?
  2. Is in some way that constructor chaining is an application of the above three usages that I am not aware of ?
Telastyn
  • 110,259

1 Answers1

1

The article you linked says (emphasis mine):

The following are common uses of this:

The article doesn't say that this doesn't have other uses. In fact, it also explicitly says that it doesn't discuss another use of this:

This article discusses the use of this with class instances. For more information about its use in extension methods, see Extension Methods (C# Programming Guide).

If you think that using this in constructor chaining should be discussed in that article, consider filing a bug.

svick
  • 10,137
  • 1
  • 39
  • 53