1 2 3 4
public static class MidnightPartitioner { public struct SchedulePartition ...
1 2 3 4
/// <summary> /// Compares the content of two enumerables for equality. Order /// of elements does NOT matter. Elements may exist multiple ...
C# IEnumerable<> compari...
VS08 grants only a maintain...
1 2 3 4
<select id="<%Response.Write(QuantityId); %>" onmousewheel="return(false);" name="<%Response.Write(QuantityId); %>" onchange="javascript:<%Response.Write(ChangeHandler); %>"> <% ...
C# Asp.Net Dropdown list
I know there's a better way...
1 2 3 4
namespace LayoutManager { ///<summary> ...
C# Best fit instantiation
by astolk,
May 25, 2009 15:25,
1 refactoring
I'd like to have some sugge...
1 2 3 4
using System; using System.Collections.Generic; using System.Text; ...
C# Square Class
A messy class that has grow...
1 2 3
using System.Collections.Generic; using System.IO; ...
C# Gedcom Reader
Created this reader class f...
1 2 3 4
public IList<IStatus> RepsonseHandler(string responseText) { IList<IStatus> Output = null; ...
C# Generic Lists of Different ...
I have some code for a Twit...
1 2 3 4
public class CompositeVolume : Volume { private readonly Random Random = new Random(); ...
C# Find random point inside a ...
by mafutrct,
May 07, 2009 14:32,
1 refactoring
Volume is an abstract geome...
1 2 3 4
public static void CssAddClass(this Control control, string className) { if (control == null) ...
C# ASP.NET CSS classes
Have at it.
1 2 3 4
UI Layer
private void SaveEquipment()
...
C# Help me Refactor My Classes...
Please help me refactor thi...
1 2 3 4
using System; using System.Collections.Generic; using System.Linq; ...
C# Find the list's last satisf...
by mafutrct,
April 17, 2009 09:43,
3 refactorings
First of all, i'm new to th...
1 2 3 4
using System; using System.Collections.Generic; using System.Linq; ...
C# C# Socket
This is a HTTP socket that ...
1 2 3 4
using System; using System.Collections.Generic; using System.Linq; ...
C# Algorithm for zig-zagging o...
I was just writing up a blo...
1 2 3 4
private string GetDateString(List<DateTime> dates) { StringBuilder sb = new StringBuilder(); ...
C# Showing several datetimes (...
by mannu.myopenid.com,
March 26, 2009 09:34,
4 refactorings
Hi all,
I've made a meth...
1 2 3 4
String foo = Request.QueryString["foo"]; if (!String.IsNullOrEmpty(foo)) { ...
C# Looking for a pattern to ha...
There is a page in a C# web...
1 2 3 4
public interface IName { string getLastName(); ...
C# Refactoring Help Needed
Please help me make this co...
1 2 3 4
/// <summary> /// Load application plugins from folder /// </summary> ...
C# Plugin Loader
I'm not having any problems...
1 2 3 4
private byte[] ReadFully(Socket p_connection) { Socket connection = p_connection; ...
C# Method to read Network stre...
by Ice^^Heat,
March 21, 2009 14:44,
1 refactoring
This method will read HTTP ...
1 2 3 4
protected void btnUpload_Click(object sender, EventArgs e) { try ...
C# Import File
How would you refactor this?
1 2 3 4
public string CleanHtml(object Html) { var s = Html.ToString(); var b = new StringBuilder(); ...
C# C# HTML Encoding
This is my own attempt at w...
1 2 3 4
/// <summary> /// This function actually alters the text and makes the necessary changes. /// </summary> ...
C# HTML Reprocessing Code
The code below is evil. It'...
1 2 3 4
using System.Collections.Generic; using Microsoft.VisualStudio.TestTools.UnitTesting; ...
C# Testing the Singleton Pattern
I am doing a step by step e...
1 2 3 4
public class MvNetDB { protected mvAccount _account = null; ...
C# Help me with ineritance or ...
I'm new to C# and working o...
1 2 3 4
//Solution #1a //Uses a HttpModule to intercept context.PreRequestHandlerExecute to call ObjectFactory.BuildUp(HttpContext.Current.Handler) ...
C# Presenter injection in Mode...
by dotnetchris,
February 05, 2009 04:05,
No refactoring, tagged with structuremap, dependency injection, inversion of control, model-view-presenter
I've implemented my own cop...
1 2 3 4
public class XmlStringSerializer { static Dictionary<string, Type> types = new Dictionary<string, Type>(); ...
C# Polymorphic XML serializer
The default XML serializer ...
I have this little class ca...