Skip to content

Instantly share code, notes, and snippets.

@fmquaglia
Last active December 21, 2015 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fmquaglia/6309506 to your computer and use it in GitHub Desktop.
Save fmquaglia/6309506 to your computer and use it in GitHub Desktop.
List<string> someStrings = new List<string>() { “hello”, “goodbye”, “thanks”};
int count = someStrings.Count();
int count2 = someString.Count;
public IEnumerable<Contact> GetContacts(){
IEnumerable<Contact> list = SomeServiceWhichReturnsListOfContacts();
return list;
}
public IEnumerable<Contact> GetContacts(){
IEnumerable<Contact> list = SomeServiceWhichReturnsListOfContacts();
return list.ToList();
}
//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