Created
May 5, 2018 21:14
-
-
Save christiannagel/781d29c91e8eb263086d79eaa5caf6d8 to your computer and use it in GitHub Desktop.
Expression-bodied members with C# 7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// C# 6 | |
private string _firstName; | |
public string FirstName | |
{ | |
get { return _firstName; } | |
set { Set(ref _firstName, value); } | |
} | |
// C# 7 | |
private string _firstName; | |
public string FirstName | |
{ | |
get => _firstName; | |
set => Set(ref _firstName, value); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment