Always remain updated about current software development trends

Articles by ANDREW RISSING

A Portable and Efficient Generic Parser for Flat Files

GenericParser is a C# implementation of a parser for delimited and fixed width format files.

Alternative to Activator.CreateInstance

Using expressions, you can achieve a faster result with less code.public static T New(){ Type t = typeof(T); Func method = Expression.Lambda>(Expression.Block(t, new Expression[] { Expression.New(t) })).Compile(); return method();}Furthermore, this...

Setting a default value for C# Auto-implemented properties

After describing it so much, I felt the need to go ahead and implement it. So here goes...using System;using System.Collections.Generic;using System.ComponentModel;using System.Linq.Expressions;using System.Reflection;namespace DefaultValue{ /// ///...

Color Code to SolidColor Conversion

A slight improvement over AdamDavidHill's version:public static SolidColorBrush GetColor(string s){ return new SolidColorBrush(ColorTranslator.FromHtml(s));}While it won't handle a missing "#", it is reusing what is built in already into .NET.

  • Page 1 of 1
  •