CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of WTF
C#
// Take into account exceptions might occur
try
{
  // some code here that's less funny ;-)
}
// Process exceptions
catch (Exception ex)
{
}
by dvdstelt   March 08, 2010 @ 12:53am
Tags: dailywtf
285 Views
1 comments
 
C#
//doesn't close connection
var tags = String.Join(",", criteria.Tags.Select(t => t.SID.ToString()).ToArray());
cmd.Parameters.Add(new SqlParameter("@tags", tags));
 
//doesn't close connection
var parm = new SqlParameter("@tags", String.Join(",", criteria.Tags.Select(t => t.SID.ToString()).ToArray()));
cmd.Parameters.Add(parm);
 
//CLOSES THE CONNECTION?!
cmd.Parameters.Add(new SqlParameter("@tags", String.Join(",", criteria.Tags.Select(t => t.SID.ToString()).ToArray())));
by Mitch   November 24, 2009 @ 1:29pm
Tags: .net wtf
177 Views
no comments
 
C#
public class SomeController
{
  private static SomeController instance;
  public SomeController(){}
 
  /// <summary>
  /// Gets the instance.
  /// </summary>
  /// <returns></returns>
  public static SomeController GetInstance()
by Mike Minutillo   September 16, 2009 @ 8:12pm
177 Views
1 comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate