I want to ask why we use "this" keyword before the parameter in an extension method (C# Language)...........
like this function :
public static int ToInt(this string number)
{
return Int32.Parse(number);
}
I know that we have to use it but I don't know why.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…