Last active
January 3, 2016 09:19
-
-
Save controlflow/8441539 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class Foo { | |
readonly List<string> _names = new List<string>(); | |
readonly SomeType _someType = new SomeType(); | |
public Foo(string name) { | |
_names.Add(name); | |
_someType.SomeProperty = name; | |
} | |
} | |
// => | |
class Foo(string name) { | |
readonly List<string> _names = new List<string> { name }; | |
readonly SomeType _someType = new SomeType { SomeProperty = name }; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment