1
2
3
4
public static class DisplayHelper
{
	[DllImport("user32.dll")]
...

C# Extend my Windows desktop o...

by loraderon.myopenid.com, March 17, 2010 13:56, No refactoring, tagged with windows, win32

Enables a secondary monitor

682a9ec8802319caf27eadd7666ae6e3 Talk
1
2
3
4
public static XmlNode ViewFields
{
  get
...

C# XmlNode creation

by Robert, March 06, 2010 13:36, 1 refactoring, tagged with xmldocument

Very simple piece of code w...

Bf2af16812228b5a54daeb30c96efaf2 Talk
1
2
3
4
public partial class Attivazioni
{
            public byte[] CodiceRichiesta
...

C# Properties surrounding arra...

by marcomangia.myopenid.com, March 02, 2010 13:45, 1 refactoring, tagged with array byte property

Is there a better way to su...

87bb826b11aa8dc35bcc7436043e0f7e Talk
1
2
3
4
public class TelnetParser
    {
        public event EventHandler<TelnetCommandEventArgs> Command;
...

C# Created a Telnet Parser wit...

by Killersponge, February 02, 2010 12:01, 1 refactoring, tagged with Telnet, TDD, C#

So I've was just using TDD ...

B20991026b45ee0d77e9bbb2b6776097 Talk
1
2
3
4
public static string ToFormattedList<T>(this HtmlHelper helper, IList<T> objectList, ListType listType, Func<T, string> valueReturn)
{

...

C# ASP.Net MVC HTML List helper

by czemuja.myopenid.com, January 25, 2010 23:55, 1 refactoring

I wanted to display list fr...

Df5b3718dcbe9055cc6672d8715fcf4f Talk
1
2
3
4
private static bool SetFolderBasedOnFirstStatus(PurchaseOrder po)
{
    bool documentFinished = false;
...

C# Two methods, two enums.

by mrgrande.livejournal.com, January 22, 2010 20:24, 1 refactoring, tagged with C#, enum

I have these two very simil...

Avatar Talk
1
2
3
4
public static byte[] ResizeImageFile(byte[] imageFile, int targetSize)
{
    using (System.Drawing.Image oldImage = System.Drawing.Image.FromStream(new MemoryStream(imageFile)))
...

C# Image Resizing

by tmeers.myopenid.com, January 08, 2010 03:03, 1 refactoring, tagged with C#, gdi+

I'm really trying to nail o...

Avatar Talk
1
2
3
4
private static void Log(object message, MessageType type)
		{
			string str = message.ToString();
...

C# Line splitting optimization

by xeon06.myopenid.com, December 07, 2009 20:59, 3 refactorings, tagged with optimize, speed, C#, xna, lines

This is a console logging f...

Avatar Talk
1
2
3
4
        public static Func<TDbTable, bool> GetWhereClauseForAll<TDbTable, TEntity>(
            this List<TEntity> objects,
            Func<TEntity, Func<TDbTable, bool>> comparison)
...

C# Generic Linq where clause O...

by Torbjørn, November 12, 2009 11:43, 1 refactoring, tagged with generics, LINQ, Extension

Suddenly found myself havin...

8bc7bb10bee96efb190053fe92ffd250 Talk
1
2
3
4
//
// frmMain
//
...

C# FlashCard Program Using SQLite

by etherealmonkey.myopenid.com, October 31, 2009 18:47, 2 refactorings, tagged with C#, sqlite

I'm a newb, so please be ni...

Avatar Talk
1
2
3
4
public string Transform(string cssPath, string cssContent)
{
        return Regex.Replace(cssContent, @"url\((?<url>.*?)\)", 
...

C# Modify relative urls in a c...

by Buu Nguyen, October 30, 2009 16:39, 5 refactorings, tagged with css asp.net c#

This function changes all U...

B9254a3eaa9b34627e7bf617b32b0ed9 Talk
1
2
int count = 0;
Dictionary<string,int> headers = line.Split(',').ToDictionary(y => y, y => count++);

C# Comma separated string to D...

by neiled, October 08, 2009 16:07, 2 refactorings, tagged with Todictionary, oneliner

Anyone up for the challenge...

Fe2f7a39fccc30dc84a2ccd79dae2bc5 Talk
1
2
3
4
public static class ObjectToXmlConverter
{
    #region Class Methods
...

C# XML Object Serializer to XS...

by dotnetchris, September 25, 2009 19:20, 2 refactorings, tagged with C#, xml, serialization, xslt, transform

I'm using XSLT for document...

F0e7c2d0d5d83c928cfcfce66928160e Talk
1
2
3
4
 public void ChangeCommuteItems(int startAtRecord)
        {
            using (DataContext context = new DataContext())
...

C# Improve Batch Processing fo...

by thekevdog.myopenid.com, August 27, 2009 13:58, 1 refactoring, tagged with C#, batch, LINQ

I need to do a bunch of dat...

Avatar Talk
1
2
3
4
public ActionResult Add(FormCollection values)
        {
            var keywordRepository = new DataRepository<Keyword>();
...

C# Form Add

by alex, August 24, 2009 11:08, 5 refactorings, tagged with C#, asp.net-mvc

I have this method wich is ...

Avatar Talk
1
2
3
4
       static void Main(string[] args)
        {            
            FmsTelegramm telegramm = new FmsTelegramm()
...

C# Actions on telegramms

by kbellmann.myopenid.com, August 19, 2009 14:21, 5 refactorings, tagged with rule match

I do have telegramms that d...

941bcb7e4a0282c5772baf76020daaab Talk
1
2
3
/// <summary>
...

C# CircularLinkedList

by navaneethkn, August 14, 2009 08:45, 4 refactorings, tagged with C#, linked-list, algorithms

Here is my circular linked ...

B2522e761028dd3af7fa39c744adefc3 Talk
1
2
3
4
class Program
    {

...

C# .Net Console Application H...

by zsysopx.myopenid.com, August 13, 2009 16:01, 3 refactorings, tagged with .net, C#, Console Application

Hi all i would like someone...

Avatar Talk
1
2
3
4
public class OpenTableCommandBuilder : CommandStringBuilder
    {
        string template = @"Open Table {FileName} {TableName}
...

C# Refactor string command bui...

by madmanwoo.myopenid.com, July 10, 2009 03:59, 1 refactoring, tagged with C#, builder, string building

I was wondering if anyone c...

03ccba009c26488991d9ec669e3fccf6 Talk
1
2
3
4
using System;
using System.Collections.Generic;
using System.Linq;
...

C# Cached IEnumerable<T>

by Charles Strahan, July 06, 2009 15:15, 1 refactoring, tagged with speed, C#, IEnumerable

Hello,

I created a this ...

A1e6f320dcdb6a0afd7fd19a1e5f932e Talk
1
2
3
4
		protected override Dictionary<GloballyFilteredPositionSource, DevicePosition> Reconfigure (
			Dictionary<GloballyFilteredPositionSource, DevicePosition> positions)
		{
...

C# How to break up this long b...

by mafutrct, July 06, 2009 12:33, 2 refactorings, tagged with split LINQ

A lot of refactoring finall...

A7c22254d91baa9ca18786a9d46549f0 Talk
1
2
3
4
public static class MidnightPartitioner
    {
        public struct SchedulePartition
...

C# Split DateTime Range Around...

by MRuston, July 01, 2009 14:42, 3 refactorings, tagged with DateTime, midnight, split

I have this little class ca...

Bac730989e88a593d5f23cfa4d41dc6f Talk
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...

by mafutrct, June 22, 2009 07:08, 8 refactorings, tagged with IEnumerable, Comparison, Dictionary

VS08 grants only a maintain...

A7c22254d91baa9ca18786a9d46549f0 Talk
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

by emptyiness12z.blogspot.com, June 08, 2009 19:06, 3 refactorings, tagged with asp.net

I know there's a better way...

Avatar Talk
1
2
3
4
using System;
using System.Collections.Generic;
using System.Text;
...

C# Square Class

by emptyiness12z.blogspot.com, May 24, 2009 09:48, 2 refactorings, tagged with C#

A messy class that has grow...

Avatar Talk