I am using this line of code in my project and haven`t seen this syntax.
internal static StringBuilder a(this StringBuilder sb, string b) => sb.Append(b).Ap
This line consists of two main features. The first is an extension method which is the method signature defined to the left of the lambda symbol (=>
) and can be identified as an extension method as it uses the this
keyword before the first parameter. The second is called an expression bodied function which is the part to the right of the lambda symbol.
Extension methods
Expression bodied functions