Created
September 28, 2012 20:37
-
-
Save xuanvu/3801955 to your computer and use it in GitHub Desktop.
Convert multiple lines of condition into 1 single line of LINQ statement
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
private static bool DoSomething(string name) | |
{ | |
var result = false; | |
if(name == "SomeName") | |
{ | |
result = true; | |
} | |
return result; | |
} | |
private static bool DoSomething(string name) | |
{ | |
return name.Equals("SomeName "); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment