Ratnakar’s Weblog

Host your Silverlight applications for free (upto 4gb) at…

Posted in General I.T by Ratnakar Garikipati on September 14, 2007


Microsoft® Silverlight™ Streaming by Windows Live™ is a companion service for Silverlight that makes it easier for developers and designers to deliver and scale rich media as part of their Silverlight applications.

The service offers web designers and developers a free and convenient solution for hosting and streaming cross-platform, cross-browser media experiences and rich interactive applications that run on Windows™ and Mac. Combined with the ability to create content with Microsoft® Expression Studio and other 3rd party tools, Web designers and content publishers wishing to integrate Silverlight applications into their online properties can enjoy complete control of the end user experience.

more to come on this topic…so watch this space =)


C# 3.0 demo

Posted in C# by Ratnakar Garikipati on August 24, 2007

My previous blog talks about the new C# language enhancements/extensions.


Here’s an excerpt from Luke’s C# demo at TechEd 2007 which covers things like Auto-Implemented properties, ‘var’ – Local Variable Type Inference, Collection Initializers, Object Initializers, Lambda Expressions etc


If you are a C# enthusiast…I would suggest you subscribe to his feeds at: http://blogs.msdn.com/lukeh/


using System;

//using System.Linq;

using System.Collections.Generic;

class Customer


    // C#3.0 Feature:  Auto-Implemented Properties

    public string CustomerID { get; set; }

    public string ContactName { get; set; }

    public string City { get; set; }


public delegate TResult Func<TArg, TResult>(TArg c);

static class Query


    // C#3.0 Feature:  Extension Methods

    public static IEnumerable<T> Where<T>(this IEnumerable<T> source, Func<T,bool> filter)


        foreach (var item in source)

            if (filter(item))

                yield return item;


    public static IEnumerable<TResult> Select<TSource,TResult>(this IEnumerable<TSource> source, Func<TSource,TResult> selector)


        foreach (var item in source)

            yield return selector(item);



class Program


    static void Main(string[] args)


        List<Customer> customers = LoadCustomers();

        // C#3.0 Feature:  Query Expressions

        var query = from c in customers

                    where c.City == “London”

                    // C#3.0 Feature:  Anonymous Types

                    select new { c.CustomerID, c.ContactName };

        // C#3.0 Feature:  Lambda Expressions

        //var query = Query.Select(Query.Where(customers, c => c.City == “London”),

        //                         c => new { c.CustomerID, c.ContactName });

        //var query = customers.Where(c => c.City == “London”)

        //                     .Select(c => new { c.CustomerID, c.ContactName });

        foreach (var item in query)

            Console.WriteLine(“{0}, {1}”, item.CustomerID, item.ContactName);


    private static List<Customer> LoadCustomers()


        // C#3.0 Feature:  ‘var’ – Local Variable Type Inference

        // C#3.0 Feature:  Collection Initializers

        var customers = new List<Customer>()


            // C#3.0 Feature:  Object Initializers

            new Customer { CustomerID = “ALFKI”, ContactName = “Maria Anders”, City = “Berlin”},

            new Customer { CustomerID = “ANATR”, ContactName = “Ana Trujillo”, City = “México D.F.”},

            new Customer { CustomerID = “WOLZA”, ContactName = “Zbyszek Piestrzeniewicz”, City = “Warszawa”}


        return customers;



Tech-Ed 2007 New Zealand – has come and gone!

Posted in General I.T by Ratnakar Garikipati on August 17, 2007

With over 100 experts and 2000 delegates it was bigger than last year.


My favourite topic clearly –  “Windows Communication Foundation”.


Due to the hectic schedule and the urgent deliverables at hand I couldn’t attend all the sessions. But for me clearly the stand-out sessions were the WCF ones by Justin Smith. His sessions were very useful, relevant and to-the-point. I had a chat with him after one of his sessions and I was humbled by the command that he had on the subject. For those who are working or about to embark on a project that involves WCF, I strongly recommend you keep a very close watch on his blogs or subscribe the feeds.


From what I gather, WCF is considered to be the best written framework that Microsoft put together so far. Also, the SDK for WCF is quite comprehensive and a good place to start.


I will add a couple of posts covering the goodies that were mentioned by Justin during his sessions…and may be link or two to his powerpoint slides.


TechFest – The theme was great, Evermore was great…but I felt Townhall wasn’t the best choice, it was small, resonant and pretty much faded the good performance of Evermore.