✅ Extension Methods
this is an extension method that i have read in the docs , my question is when i use this extension method as below code in that case the
this
keyword bind the sentence string inside method as i did not pass any parameter correct?
5 Replies
Yes it's correct.
Basically it compiles to
i mean this in that case is the sentence correct
yes, the
this
argument in an extension method is the object that you called the extension method on
you did not pass it yourself, but like blueberries explained the compiler does some shuffling behind the scenes to pass it for youok thank you all