Wriju's BLOG

.NET, Cloud and everything

ADO.NET Entity Framework 4.0 : POCO – The Code Only Approach

POCO in ADO.NET Entity Framework 4.0 has been discussed in many places. Here I am not going to talk about it. However, I created a small sample to demonstrate the capability of POCO in much more cleaner “code-only” approach. <<Apology for this blog post issue>>. There were some images, due to which it was not… Read more

.NET Framework 4.0 Newbie : SortedSet<T>

In .NET Framework 4.0 we have a new class called SortedSet<T>. This helps us to sort the elements without explicitly we implementing any sort method. var sSet = new SortedSet<int> { 2, 4, 6, 8, 9, 1, 3, 5, 7 };   //Getting directly the sorted output foreach (int iVal in sSet) {     Console.WriteLine(iVal);… Read more

C# 4.0 and Parallel Programming Resources

C# 4.0   The Future of C# by Anders Hejlsberg at PDC 2008 https://channel9.msdn.com/pdc2008/TL16/   Slide Deck http://mschnlnine.vo.llnwd.net/d1/pdc08/PPTX/TL16.pptx   Sample Code and Whitepapers http://code.msdn.microsoft.com/csharpfuture/   C# 4.0, Dynamic Programming and JSON http://www.nikhilk.net/CSharp-Dynamic-Programming-JSON.aspx   Easy to understand Co- and Contra Varinace http://blogs.msdn.com/charlie/archive/2008/10/28/linq-farm-covariance-and-contravariance-in-visual-studio-2010.aspx   Parallel Programming   PDC 2008 Session by Daniel Moth   Parallel Programming for… Read more

C# 4.0 : Co-variance and Contra-variance

Here I am going to talk about the feature called Covariance and Contravariance. To show you the example I will use delegate. Now what is it? This would be a big question and with no hesitance I must say that you should visit Eric’s blog. There are some articles which will help you understand. To… Read more

C# 4.0 : New Extension Method “Zip”

While browsing the features I found an interesting extension method called “Zip”. How it works, let’s check it. List<string> names = new List<string> {“Debajyoti”, “Sumitra”, “Wriju” , “Writam”, “Tupur” };   List<int> ages = new List<int>{ 67, 58, 30, 24, 26 };   var zipped = names.Zip(ages, (name, age) => name + ” is “… Read more

C# 4.0 : Named Arguments

For methods having numerous arguments we tend to get confused. And this is also pain for others while reviewing the code. C# 4.0 gives us an opportunity to pass parameters with name. How it works, let’s check it. Suppose you have a method like below, public static class TestClass {    public static void ParamMethod(string… Read more

C# 4.0 : Optional Parameters

Days of creating multiple overloads to avoid parameters are gone. You no more have to create many methods and pass the default one there. C# 4.0 brings to us the concept of “optional” parameters. How it works, let’s check it. Suppose you have a method like below, public static class TestClass {    public static… Read more

C# 4.0 : Dynamic Objects

“Working with dynamic objects statically” – Anders Hejlsberg When you work with C# 4.0 you get to work with many unmanaged world “dynamically”. What does that mean to you? It means you do not do things “statically” as you used to do in C# or in VB.NET. There are many benefits in static programming like… Read more