Showing posts with label How to. Show all posts
Showing posts with label How to. Show all posts

Saturday, 28 May 2011

Hello NZ. How to post source code in Blogger BlogSpot

This is a test post.

// This is called Generic Type
    class Pair
    {
        public TKey Key { get; set; }
        public TValue Value { get; set; }

        public Pair(TKey key, TValue value){
            Key = key;
            Value = value;
        }

        // This is called Generic Method
        public void InferredTypeArgument(T sameAsTypeParameter)
        {
            Console.WriteLine(typeof(T));
        }
    }