Last active
December 21, 2015 12:59
-
-
Save fmquaglia/6309506 to your computer and use it in GitHub Desktop.
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
List<string> someStrings = new List<string>() { “hello”, “goodbye”, “thanks”}; | |
int count = someStrings.Count(); | |
int count2 = someString.Count; |
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
public IEnumerable<Contact> GetContacts(){ | |
IEnumerable<Contact> list = SomeServiceWhichReturnsListOfContacts(); | |
return list; | |
} | |
public IEnumerable<Contact> GetContacts(){ | |
IEnumerable<Contact> list = SomeServiceWhichReturnsListOfContacts(); | |
return list.ToList(); | |
} |
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
//A.) | |
try{ | |
//some great c# code | |
} | |
catch(Exception ex){ | |
throw; | |
} | |
//B.) | |
try{ | |
//some great c# code | |
} | |
catch(Exception ex){ | |
throw ex; | |
} | |
//C.) | |
try{ | |
//some great c# code | |
} | |
catch(Exception ex){ | |
throw new ApplicationException(ex); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment