background preloader


Facebook Twitter


Microsoft Type Design Guildelines. From the CLR perspective, there are only two categories of types—reference types and value types—but for the purpose of a discussion about framework design, we divide types into more logical groups, each with its own specific design rules.

Microsoft Type Design Guildelines

Classes are the general case of reference types. They make up the bulk of types in the majority of frameworks. Classes owe their popularity to the rich set of object-oriented features they support and to their general applicability. Base classes and abstract classes are special logical groups related to extensibility.


Tree<T>: Implementing a Non-Binary Tree in C# « Critical Development. Download the Source.

Tree<T>: Implementing a Non-Binary Tree in C# « Critical Development

Asynchronous Programming - Easier Asynchronous Programming with the New Visual Studio Async CTP. Imagine what the world would be like if people worked the same way as computer programs: void ServeBreakfast(Customer diner){ var order = ObtainOrder(diner); var ingredients = ObtainIngredients(order); var recipe = ObtainRecipe(order); var meal = recipe.Prepare(ingredients); diner.Give(meal);} Each subroutine can, of course, be broken down further; preparing the meal might involve heating pans, cooking omelets and toasting bread.

Were humans to perform these sorts of tasks like typical computer programs, we’d carefully write down everything as sequences of hierarchical tasks in a checklist and obsessively ensure that each job was complete before embarking on the next. A subroutine-based approach seems reasonable—you can’t cook the eggs before you get the order—but in fact it both wastes time and makes the application appear unresponsive. Reflection Overview. Reflection can also be used to create applications called type browsers, which enable users to select types and then view the information about those types.

Reflection Overview

Dynamic in C# 4.0: Introducing the ExpandoObject - C# Frequently Asked Questions. Well, where else can you use this new feature? What are the use cases? Impromptu-interface - ImpromptuInterface: Static interface to dynamic implementation (duck casting). That and more using the DLR. This Project has been moved to GitHub: C# 4.0 (.net & silverlight) framework to allow you to wrap any object (static or dynamic) with a static interface even though it didn't inherit from it.

impromptu-interface - ImpromptuInterface: Static interface to dynamic implementation (duck casting). That and more using the DLR.

It does this by emitting cached dynamic binding code inside a proxy. By expanding on the DLR plumbing used to implement this library, it has grown to support more general dynamic implementations. See Usage for full examples of all features. Other features include Really Late Binding, Inline Syntaxes, Currying, some dynamic extensions for FSharp, and unsealed Dynamic Objects including a fully dynamic MVVM ViewModel Quick Usage: Unusual uses of ExpandoObject in C# 4 : Reed Copsey, Jr. Posted by Reed on Friday, November 6, 2009 · 7 Comments Most of the examples for using ExpandoObject basically demonstrate a replacement for a Hashtable or Dictionary<string,object>, but with a “nicer” syntax.

Unusual uses of ExpandoObject in C# 4 : Reed Copsey, Jr.

URL Routing in ASP.NET 4. By Scott Mitchell Introduction In the .NET Framework 3.5 SP1, Microsoft introduced ASP.NET Routing, which decouples the URL of a resource from the physical file on the web server.

URL Routing in ASP.NET 4

Using ASP.NET Routing Without ASP.NET MVC. By Scott Mitchell Introduction ASP.NET MVC is a Microsoft-supported framework for creating ASP.NET applications using a Model-View-Controller pattern.

Using ASP.NET Routing Without ASP.NET MVC

In a nutshell, ASP.NET MVC allows developers much finer control over the markup rendered by their web pages, a greater and clearer separation of concerns, better testability, and cleaner, more SEO-friendly URLs. Chapter 9. Delegates, Events, and Lambda Expressions. Problem You have multiple objects that need to observe modifications to objects that implement IDictionary<K,V>.

Chapter 9. Delegates, Events, and Lambda Expressions

When an item is added or modified in the dictionary-based collection, each of these observer objects should be able to vote to allow or disallow the action. In order for an action to be allowed to complete, all observer objects must state if they are vetoing the action. If even one observer object votes to disallow the action, the action is prevented. Solution. Lambda Expressions (C# Programming Guide) A lambda expression is an anonymous function that you can use to create delegates or expression tree types.

Lambda Expressions (C# Programming Guide)

By using lambda expressions, you can write local functions that can be passed as arguments or returned as the value of function calls. Lambda expressions are particularly helpful for writing LINQ query expressions. To create a lambda expression, you specify input parameters (if any) on the left side of the lambda operator =>, and you put the expression or statement block on the other side. For example, the lambda expression x => x * x specifies a parameter that’s named x and returns the value of x squared. You can assign this expression to a delegate type, as the following example shows: delegate int del(int i); static void Main(string[] args) { del myDelegate = x => x * x; int j = myDelegate(5); //j = 25 } To create an expression tree type: Enumerable Methods (System.Linq) LINQ TO XML. Getting Started Walking Through a Silverlight Application Take a tour of the XAML and Javascript generated by an application template that's installed with the Silverlight SDK.

Organizing XAML Assets Learn how to organize XAML assets in Expression Design and Expression Blend to maximize developer efficiency. Hosting HTML Content This video demonstrates various ways you can use existing HTML content within your Silverlight application including full pages, fragments, or syndicated content. Understanding Mouse Input. What is that IGrouping result returned from group by LINQ queries? Dynamic in C# 4.0: Introducing the ExpandoObject - C# Frequently Asked Questions.


Fabulous Adventures In Coding.