Other posts
-
Or, torturing compilers for fun and profit. I recently tweeted an interesting C# challenge: C#...
-
When writing code that deals with security or cryptography, there are a number of mistakes...
-
Web authentication systems have evolved over the past ten years to counter a growing variety...
-
_This post is part of a [series](/#code-snippets) of blog posts called code snippets. These blog...
-
_This post is part of a [series](/#code-snippets) of blog posts called code snippets. These blog...
-
_This post is part of a [series](/#code-snippets) of blog posts called code snippets. These blog...
-
_This post is part of a [series](/#code-snippets) of blog posts called code snippets. These blog...
-
_This post is the beginning of a new [series](/#code-snippets) of blog posts called code snippets....
-
[Last time](/2015-06-10/advanced-promise-usage), I described more advanced patterns for complicated workflows involving asynchronous operations. These patterns...
-
[Last time](/2015-01-08/comparing-different-languages-promises-frameworks), I listed standard & third-party promise libraries in popular languages, comparing how each...
-
[Last time](/2015-04-01/typename-comments-a-new-kind-of-comment), I introduced a new syntax for code comments, typename comments. April Fools! However,...
-
C# has two well-known styles of comments: C-style comments (`/* ... */`) and C++-style comments...
-
How many times have you seen code like this? ```csharp if (someSequence.Count() > 2) {...
-
[Last time](/2015-01-05/introducing-promises), I explained what promises are and how they work. Now, I'll explore standard...
-
[Last time](/2015-01-04/async-method-patterns), I explored the two main options for writing asynchronous functions. Now, I'll describe...
-
[Last time](/2014-12-23/parallelism-async-threading-explained), I explained the basic concepts of asynchronous and multi-threaded programming. As I explained...
-
Concurrent programming techniques, such as multi-threading or asynchronous operations, are all the rage nowadays. As...
-
# Background Both Visual Studio and Roslyn use the [Managed Extensibility Framework](https://mef.codeplex.com/) (MEF) to build...
-
Visual Studio 2010 rewrote the entire shell UI – the MDI tabs & tool windows,...
-
As I've described [earlier]({% post_url 2013-11-10-extending-visual-studio-part-2-core-concepts %}), when creating a Visual Studio extension, you are...
-
[Last time]({% post_url 2014-05-21-exploring-roslyn-part-2-inside-end-user-preview %}), I talked about what the Roslyn End-User Preview does and...
-
[Last time]({% post_url 2014-04-07-exploring-roslyn-part-1-introduction %}), I described the basics of the Roslyn compiler platform, including...
-
The .Net Compiler Platform, codenamed "Roslyn", is the most ambitious project from Microsoft's Developer Division...
-
Errors are one of the most common and annoying problems in programming. Whether it's the...
-
After four exciting years, I am regretfully leaving the [Microsoft MVP program](http://mvp.microsoft.com/). I have greatly...
-
[Last time]({% post_url 2014-02-25-extending-visual-studio-part-4-writing-cross-version-extensions %}), I talked about how to write Visual Studio extensions that...
-
[Last time]({% post_url 2014-02-21-extending-visual-studio-part-3-assembly-versioning %}), I talked about the different approaches that Visual Studio takes...
-
The new [.Net Reference Source Browser](http://referencesource-beta.microsoft.com/) (see my [previous post]({% post_url 2014-02-24-inside-the-new-net-reference-source %})) is an...
-
Seven years ago, Microsoft released the .Net Reference Source Code, containing source for much of...
-
[Last time]({% post_url 2013-11-10-extending-visual-studio-part-2-core-concepts %}), I talked about the core concepts and basic assemblies within...
-
When using Visual Studio, it can ocasionally be useful to have separate “profiles” – to...
-
One of Gmail's many useful features is "Send mail as", which lets you use a...
-
.Net's [assembly resolver](http://msdn.microsoft.com/en-us/library/yx7xezcf) (Fusion) takes assembly names (eg, `MyCompany.MyProduct, Version=2.1.0.0, , Culture=neutral, PublicKeyToken=3bf5f017df1a30a5`) and resolves...
-
After over two months of work, I rewrote the Markdown editor in [Web Essentials](http://vswebessentials.com/) to...
-
Some interfaces have events that most implementations will never raise. For example, the WPF `ICommand`...
-
[My previous post]({% post_url 2013-10-18-extending-visual-studio-part-1-getting-started %}) described how to get started writing Visual Studio extensions....
-
In addition to being an excellent development environment, Visual Studio also has a powerful extensibility...
-
.Net has three low-level mechanisms to run code in parallel: `Thread`, `ThreadPool`, and `Task`. These...
-
One of the less-documented features of the [LESS language](http://lesscss.org) is the ampersand selector, which refers...
-
_Javasript is not a traditionally object-oriented programming languague_. Wikipedia [describes Javascript](http://en.wikipedia.org/wiki/Javascript) as a ”scripting, object-oriented...
-
{% assign openTag = '{%' %} After upgrading to Jekyll 1.1, you may notice that...
-
As I mentioned [last time]({% post_url 2013-07-22-thread-safe-data-structures %}), the best way to create simple thread-safe...
-
[Last time]({% post_url 2013-06-23-creating-immutable-stack %}), I showed how to create a simple [covariant]({% post_url 2013-06-28-covariant-immutable-stack...
-
[Last time]({% post_url 2013-06-23-creating-immutable-stack %}), I showed how to create a simple immutable stack. However,...
-
[Last time]({% post_url 2013-06-11-readonly-vs-immutable %}), I explained the basic meaning of immutability. The simplest useful...
-
A _read-only_ object is an object that does not expose any way to change it....
-
{% assign openTag = '{%' %} [Last time]({% post_url 2013-06-09-writing-about-jekyll-in-jekyll %}), we saw how to...
-
[Jekyll](http://jekyllrb.com) is a very nice system for writing blogs. However, it does have some shortcomings,...
-
The next step in [migrating my blog to Jekyll]({% post_url 2013-05-31-migrating-from-blogger-to-jekyll %}) was to convert...
-
The first step in my migration to Jekyll was to import my old posts into...
-
My new design is powered by Jekyll and LESS (the LESS does as much or...
-
After nearly a year of inactivity, I have finally returned to my blog. I had...
-
{% raw %} If you open an older ASP.Net MVC3 project in Visual Studio 2012,...
-
{% raw %} Last year, Microsoft announced a simple new feature in C# 5: Caller...
-
{% raw %} If you use the ASP.Net MVC 3 [Compare] validation attribute on a...
-
{% raw %} CSRF attacks are one of the many security issues that web developers...
-
{% raw %} What’s wrong with the following code? {% endraw %} {% highlight csharp...
-
{% raw %} One common misconception about web security is that protecting important actions with CAPTCHAs...
-
{% raw %} One of the most useful additions to the .Net 4.0 base class...
-
{% raw %} ASP.Net MVC uses the new (to ASP.Net 3.5) Http*Base wrapper classes (HttpContextBase,...
-
{% raw %} People sometimes wonder why C# 5 needs to add caller info attributes,...
-
{% raw %} UPDATE: Now that the Visual Studio 11 beta has shipped with this...
-
{% raw %} UPDATE: Now that the Visual Studio 11 beta has shipped with this...
-
{% raw %} UPDATE: Now that the Visual Studio 11 beta has shipped with this...
-
{% raw %} One common question about ASP.Net MVC is how to make “default” controller....
-
{% raw %} Update: This bug was fixed in XRegExp 1.5.1. However, as far as...
-
{% raw %} Part 1 is here Some languages have better ways to pass boolean...
-
{% raw %} Have you ever written code like this: {% endraw %} {% highlight...
-
{% raw %} C# is usually touted as a type-safe language. However, it is not...
-
{% raw %} Until now, I've been focusing on only one of the differences between...
-
{% raw %} When working with large .Net applications, it can be useful to find...
-
{% raw %} A .Net event actually consists of a pair of accessor methods named...
-
{% raw %} Sometimes, it can be useful to make an extension method specifically for...
-
{% raw %} Unlike WinForms or native Win32 development, WPF provides a rich layout model...
-
{% raw %} This is part 5 in a series about state and function pointers;...
-
{% raw %} This is part 4 in a series about state and function pointers;...
-
{% raw %} .Net supports two kinds of delegates: Open delegates and closed delegates. When...
-
{% raw %} This is part 3 in a series about state and function pointers;...
-
{% raw %} This is part 2 in a series about state and function pointers;...
-
{% raw %} Most languages – with the unfortunate exception of Java – allow functions...
-
{% raw %} Many people write ForEach extension methods for MVC WebForms views, which take...
-
{% raw %} Razor’s inline helpers allow you to create lambda expression that return markup...
-
{% raw %} In addition to normal and static helpers, Razor supports inline helpers, (also...
-
{% raw %} Razor helpers can be extremely useful, but they are designed to be...
-
{% raw %} The Boot Camp drivers in the latest generation of MacBook Pros now...
-
{% raw %} We’ll continue our trek into Razor’s class-level features with helpers. Helpers are...
-
{% raw %} After looking at how Razor’s Execute() method is generated, we will turn...
-
{% raw %} Last time, we saw how basic Razor constructs are translated into C#....
-
{% raw %} After looking at the various assemblies in the WebPages framework, we will...
-
{% raw %} Last time, we saw how standalone Razor pages are served. MVC3 maintains...
-
This post
-
Razor involves two distinct components: The Razor engine and the WebPages framework. The Razor engine,...
-
jQuery makes it very easy to modify a DOM tree. For example, to strip all...
-
Last time, we saw that there are severe limitations in creating ASPX pages which inherit...
-
ASP.Net pages can inherit from custom classes (as long as they inherit System.Web.UI.Page). This can...
-
.Net developers frequently need to build connection strings, especially when connecting to Access or Excel...
-
One of the unique features of ASP.Net WebPages (formerly Razor) is automatic HTML encoding. All...
-
C# 4.0 adds support for optional parameters. The following code prints 4: static void Main()...
-
The new ASP.Net WebPages view engine (formerly Razor) allows you to create reusable parameterized blocks...
-
.Net DataTables can be very useful when writing data-driven applications. However, they have one limitation:...
-
When designing fluent APIs, one issue that comes up is partial type inference. If a...
-
A common chore in developing real-world C# applications is implementing value semantics for equality. This...
-
Last time, we saw that the this parameter to an instance method in a struct...
-
Usually, you cannot pass ref this as a parameter, since this is not a writable...
-
VB.Net’s Nothing keyword is is not the same as C#’s null. MSDN states, “Assigning Nothing...
-
jQuery contains a powerful and flexible animation engine. However, it has some limitations, primarily due...
-
A generic class can specify that its generic parameter must inherit a type. However, there...
-
In part 1, we discussed the simple approach to making a nested iterator. However, we...
-
C# 2.0 introduced a powerful feature called an iterator, a method which returns an IEnumerable<T>...
-
My previous post stretched the limit of simple copy prevention. Beyond this point, it gets...
-
The methods discussed in my previous post are crude and ugly. Most of the time,...
-
Many web developers like to prevent their viewers from copying their text. While I do...