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 for: JamesEggers
C#
public class GenericComparer<T> : IComparer<T>
{
    public List<Tuple<string, bool>> Comparisons { get; set; }
 
    public int Compare(T x, T y)
    {
        int returnValue = 0;
        IComparable xval;
        IComparable yval;
        
by JamesEggers   April 28, 2010 @ 8:30am
Tags: C#, Sorting
191 Views
no comments
 
C#
class Program
{
    static void Main(string[] args)
    {
        List<Person> people = new List<Person>();
        people.Add(new Person() { FirstName = "John", LastName = "Doe"});
        people.Add(new Person() { FirstName = "Jane", LastName = "Doe" });
        people.Add(new Employee() { FirstName = "John", LastName = "Smith" });
 
        // Displays 3
by JamesEggers   April 21, 2010 @ 6:03am
Tags: LINQ
208 Views
no comments
 
C#
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
using System.Reflection;
 
namespace MEFFactory
{
    public interface IMessage
    {
by JamesEggers   April 20, 2010 @ 2:45pm
Tags: MEF
574 Views
no comments
 
C#
public class Model() {}
 
public class ViewModel() {}
 
public class ModelAdapter()
{
    public Model GetModel<T>(T viewModel)
    {
        Mapper.CreateMap<Model, T>();
by JamesEggers   March 22, 2010 @ 12:38pm
Tags:
198 Views
no 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