Methods which body consist of an expression

Sometimes a method exist of just one statement. In C# 6.0 these methods with just one statement can be replace with an expression.

public string FullName => $"{FirstName} {LastName}";

As you can see the expression use the new Interpolated string functionality.




Saving your comment....

Naam is verplicht!
Email is verplicht!
Opmerking is verplicht!