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 ?
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.