Showing 5 HTML posts. Show all
Showing 12 Javascript posts. Show all
Showing 3 iterators posts. Show all
Showing 55 C# posts. Show all
Showing 48 .Net posts. Show all
Showing 1 laziness posts. Show all
Showing 6 generics posts. Show all
Showing 4 jQuery posts. Show all
Showing 1 animation posts. Show all
Showing 2 VB.Net posts. Show all
Showing 1 conditional posts. Show all
Showing 1 posts. Show all
Showing 1 posts. Show all
Showing 2 value-types posts. Show all
Showing 1 comparison posts. Show all
Showing 1 type-inference posts. Show all
Showing 1 data-binding posts. Show all
Showing 3 LINQ posts. Show all
Showing 13 Razor posts. Show all
Showing 10 ASP.Net WebPages posts. Show all
Showing 3 Razor-helpers posts. Show all
Showing 15 ASP.Net posts. Show all
Showing 1 optional-parameters posts. Show all
Showing 1 data posts. Show all
Showing 1 string-concatenation posts. Show all
Showing 7 ASP.Net MVC posts. Show all
Showing 9 dissecting-razor posts. Show all
Showing 1 MacBook-Pro posts. Show all
Showing 1 boot-camp posts. Show all
Showing 1 Apple posts. Show all
Showing 1 Windows-7 posts. Show all
Showing 3 inline-helpers posts. Show all
Showing 1 C++ posts. Show all
Showing 2 C posts. Show all
Showing 4 closures posts. Show all
Showing 5 functions posts. Show all
Showing 4 delegates posts. Show all
Showing 1 lambda-expressions posts. Show all
Showing 1 WPF posts. Show all
Showing 1 layout posts. Show all
Showing 2 extension-methods posts. Show all
Showing 3 events posts. Show all
Showing 1 debugging posts. Show all
Showing 1 type-safety posts. Show all
Showing 2 parameters posts. Show all
Showing 5 bugs posts. Show all
Showing 1 routing posts. Show all
Showing 4 design posts. Show all
Showing 5 caller-info-attributes posts. Show all
Showing 5 C# 5 posts. Show all
Showing 6 multi-threading posts. Show all
Showing 5 thread-safety posts. Show all
Showing 1 CAPTCHA posts. Show all
Showing 1 XSS posts. Show all
Showing 5 security posts. Show all
Showing 1 covariance posts. Show all
Showing 1 Visual-Studio-2012 posts. Show all
Showing 7 Jekyll posts. Show all
Showing 3 LESS posts. Show all
Showing 1 DRY posts. Show all
Showing 1 blogger posts. Show all
Showing 2 Node.js posts. Show all
Showing 3 Liquid posts. Show all
Showing 2 jekyll-hacks posts. Show all
Showing 4 oop posts. Show all
Showing 3 immutability posts. Show all
Showing 1 variance posts. Show all
Showing 2 lock-free posts. Show all
Showing 9 concepts posts. Show all
Showing 1 inheritance posts. Show all
Showing 7 async posts. Show all
Showing 4 visual-studio-2013 posts. Show all
Showing 9 vs-extensions posts. Show all
Showing 1 web-essentials posts. Show all
Showing 1 markdown posts. Show all
Showing 1 assemlies posts. Show all
Showing 1 gmail posts. Show all
Showing 1 bug posts. Show all
Showing 8 visual-studio posts. Show all
Showing 2 reference-source posts. Show all
Showing 5 Roslyn posts. Show all
Showing 1 microsoft-mvp posts. Show all
Showing 1 google posts. Show all
Showing 1 career posts. Show all
Showing 1 ErrorFree posts. Show all
Showing 1 programming-languages posts. Show all
Showing 2 april-fools posts. Show all
Showing 3 .net posts. Show all
Showing 5 promises posts. Show all
Showing 4 javascript posts. Show all
Showing 1 visual-studio-code posts. Show all
Showing 1 less posts. Show all
Showing 1 casts posts. Show all
Showing 6 code-snippets posts. Show all
Showing 1 reflection posts. Show all
Showing 1 Java posts. Show all
Showing 1 css posts. Show all
Showing 1 code-quality posts. Show all
Showing 1 cryptography posts. Show all
Showing 1 mistakes posts. Show all
Or, torturing compilers for fun and profit. I recently tweeted an interesting C# challenge: C#...
Read more
When writing code that deals with security or cryptography, there are a number of mistakes...
Read more
The entire field of computer security is dedicated to verifying the source, confidentiality, or integrity...
Read more
Web authentication systems have evolved over the past ten years to counter a growing variety...
Read more
Writing accurate, maintainable CSS for large websites requires careful planning and meticulous attention to detail....
Read more
This post is part of a series of blog posts called code snippets. These blog...
Read more
This post is part of a series of blog posts called code snippets. These blog...
Read more
This post is part of a series of blog posts called code snippets. These blog...
Read more
This post is part of a series of blog posts called code snippets. These blog...
Read more
This post is the beginning of a new series of blog posts called code snippets....
Read more
Last time, I described more advanced patterns for complicated workflows involving asynchronous operations. These patterns...
Read more
Last time, I listed standard & third-party promise libraries in popular languages, comparing how each...
Read more
While writing Silon, I had to overcome number of challenges. You can see the full...
Read more
Last week, Microsoft shocked the development community with Visual Studio Code, a new lightweight version...
Read more
Last time, I introduced a new syntax for code comments, typename comments. April Fools! However,...
Read more
C# has two well-known styles of comments: C-style comments (/* ... */) and C++-style comments...
Read more
How many times have you seen code like this? if (someSequence.Count() > 2) { }...
Read more
Last time, I explained what promises are and how they work. Now, I’ll explore standard...
Read more
Last time, I explored the two main options for writing asynchronous functions. Now, I’ll describe...
Read more
Last time, I explained the basic concepts of asynchronous and multi-threaded programming. As I explained...
Read more
Concurrent programming techniques, such as multi-threading or asynchronous operations, are all the rage nowadays. As...
Read more
Background Both Visual Studio and Roslyn use the Managed Extensibility Framework (MEF) to build large...
Read more
Visual Studio 2010 rewrote the entire shell UI – the MDI tabs & tool windows,...
Read more
As I’ve described earlier, when creating a Visual Studio extension, you are given a choice...
Read more
Last time, I talked about what the Roslyn End-User Preview does and how it works....
Read more
Last time, I described the basics of the Roslyn compiler platform, including how the different...
Read more
The .Net Compiler Platform, codenamed “Roslyn”, is the most ambitious project from Microsoft’s Developer Division...
Read more
Errors are one of the most common and annoying problems in programming. Whether it’s the...
Read more
After four exciting years, I am regretfully leaving the Microsoft MVP program. I have greatly...
Read more
Last time, I talked about how to write Visual Studio extensions that work in multiple...
Read more
Last time, I talked about the different approaches that Visual Studio takes toward assembly versioning....
Read more
The new .Net Reference Source Browser (see my previous post) is an excellent example of...
Read more
Seven years ago, Microsoft released the .Net Reference Source Code, containing source for much of...
Read more
Last time, I talked about the core concepts and basic assemblies within Visual Studio that...
Read more
When using Visual Studio, it can ocasionally be useful to have separate “profiles” – to...
Read more
One of Gmail’s many useful features is “Send mail as”, which lets you use a...
Read more
.Net’s assembly resolver (Fusion) takes assembly names (eg, MyCompany.MyProduct, Version=2.1.0.0, , Culture=neutral, PublicKeyToken=3bf5f017df1a30a5) and resolves...
Read more
After over two months of work, I rewrote the Markdown editor in Web Essentials to...
Read more
Some interfaces have events that most implementations will never raise. For example, the WPF ICommand...
Read more
My previous post described how to get started writing Visual Studio extensions. This post will...
Read more
In addition to being an excellent development environment, Visual Studio also has a powerful extensibility...
Read more
.Net has three low-level mechanisms to run code in parallel: Thread, ThreadPool, and Task. These...
Read more
One of the less-documented features of the LESS language is the ampersand selector, which refers...
Read more
Javasript is not a traditionally object-oriented programming languague. Wikipedia describes Javascript as a ”scripting, object-oriented...
Read more
After upgrading to Jekyll 1.1, you may notice that posts that used to work fine...
Read more
As I mentioned last time, the best way to create simple thread-safe lock-free data structures...
Read more
Last time, I showed how to create a simple covariant immutable stack. One of the...
Read more
Last time, I showed how to create a simple immutable stack. However, this stack is...
Read more
Last time, I explained the basic meaning of immutability. The simplest useful example of an...
Read more
A read-only object is an object that does not expose any way to change it....
Read more
Last time, we saw how to write about Jekyll tags in Jekyll-based blog posts, using...
Read more
Jekyll is a very nice system for writing blogs. However, it does have some shortcomings,...
Read more
The next step in migrating my blog to Jekyll was to convert the code blocks...
Read more
The first step in my migration to Jekyll was to import my old posts into...
Read more
My new design is powered by Jekyll and LESS (the LESS does as much or...
Read more
After nearly a year of inactivity, I have finally returned to my blog. I had...
Read more
If you open an older ASP.Net MVC3 project in Visual Studio 2012, you may see...
Read more
Last year, Microsoft announced a simple new feature in C# 5: Caller Info Attributes. These...
Read more
If you use the ASP.Net MVC 3 [Compare] validation attribute on a model property, then...
Read more
CSRF attacks are one of the many security issues that web developers must defend against. ...
Read more
What’s wrong with the following code? var names = new HashSet<string>(StringComparer.OrdinalIgnoreCase); ... if (names.Contains(sqlCommand.ExecuteScalar()) This ...
Read more
One common misconception about web security is that protecting important actions with CAPTCHAs can prevent XSS...
Read more
One of the most useful additions to the .Net 4.0 base class library is the...
Read more
ASP.Net MVC uses the new (to ASP.Net 3.5) Http*Base wrapper classes (HttpContextBase, HttpRequestBase, HttpResponseBase, etc)...
Read more
People sometimes wonder why C# 5 needs to add caller info attributes, when this information...
Read more
UPDATE: Now that the Visual Studio 11 beta has shipped with this feature implemented, I...
Read more
UPDATE: Now that the Visual Studio 11 beta has shipped with this feature implemented, I...
Read more
UPDATE: Now that the Visual Studio 11 beta has shipped with this feature implemented, I...
Read more
One common question about ASP.Net MVC is how to make “default” controller. Most websites will...
Read more
Update: This bug was fixed in XRegExp 1.5.1. However, as far as I know, there...
Read more
Part 1 is here Some languages have better ways to pass boolean parameters. C# 4.0,...
Read more
Have you ever written code like this: public void UpdateLayout(bool doFullLayout) { //Code if (doFullLayout)...
Read more
C# is usually touted as a type-safe language. However, it is not actually fully type-safe!...
Read more
Until now, I've been focusing on only one of the differences between delegates and function...
Read more
When working with large .Net applications, it can be useful to find out where event...
Read more
A .Net event actually consists of a pair of accessor methods named add_EventName and remove_EventName. ...
Read more
Sometimes, it can be useful to make an extension method specifically for a single block...
Read more
Unlike WinForms or native Win32 development, WPF provides a rich layout model which allows developers...
Read more
This is part 5 in a series about state and function pointers; part 1 is...
Read more
This is part 4 in a series about state and function pointers; part 1 is...
Read more
.Net supports two kinds of delegates: Open delegates and closed delegates. When you create a...
Read more
This is part 3 in a series about state and function pointers; part 1 is...
Read more
This is part 2 in a series about state and function pointers; part 1 is...
Read more
Most languages – with the unfortunate exception of Java – allow functions to be passed...
Read more
Many people write ForEach extension methods for MVC WebForms views, which take a sequence and...
Read more
Razor’s inline helpers allow you to create lambda expression that return markup (as a HelperResult). ...
Read more
In addition to normal and static helpers, Razor supports inline helpers, (also known as templates),...
Read more
Razor helpers can be extremely useful, but they are designed to be used only by...
Read more
The Boot Camp drivers in the latest generation of MacBook Pros now expose more of...
Read more
We’ll continue our trek into Razor’s class-level features with helpers. Helpers are one of Razor’s...
Read more
After looking at how Razor’s Execute() method is generated, we will turn to class-level features....
Read more
Last time, we saw how basic Razor constructs are translated into C#. We can see...
Read more
After looking at the various assemblies in the WebPages framework, we will drill into the...
Read more
Last time, we saw how standalone Razor pages are served. MVC3 maintains the strict separation...
Read more
Last time, we saw that ASP.Net Web Pages are implemented in two independent assemblies. These...
Read more
Razor involves two distinct components: The Razor engine and the WebPages framework. The Razor engine,...
Read more
jQuery makes it very easy to modify a DOM tree. For example, to strip all...
Read more
Last time, we saw that there are severe limitations in creating ASPX pages which inherit...
Read more
ASP.Net pages can inherit from custom classes (as long as they inherit System.Web.UI.Page). This can...
Read more
.Net developers frequently need to build connection strings, especially when connecting to Access or Excel...
Read more
One of the unique features of ASP.Net WebPages (formerly Razor) is automatic HTML encoding. All...
Read more
C# 4.0 adds support for optional parameters. The following code prints 4: static void Main()...
Read more
The new ASP.Net WebPages view engine (formerly Razor) allows you to create reusable parameterized blocks...
Read more
.Net DataTables can be very useful when writing data-driven applications. However, they have one limitation:...
Read more
When designing fluent APIs, one issue that comes up is partial type inference. If a...
Read more
A common chore in developing real-world C# applications is implementing value semantics for equality. This...
Read more
Last time, we saw that the this parameter to an instance method in a struct...
Read more
Usually, you cannot pass ref this as a parameter, since this is not a writable...
Read more
VB.Net’s Nothing keyword is is not the same as C#’s null. MSDN states, “Assigning Nothing...
Read more
jQuery contains a powerful and flexible animation engine. However, it has some limitations, primarily due...
Read more
A generic class can specify that its generic parameter must inherit a type. However, there...
Read more
In part 1, we discussed the simple approach to making a nested iterator. However, we...
Read more
C# 2.0 introduced a powerful feature called an iterator, a method which returns an IEnumerable<T>...
Read more
My previous post stretched the limit of simple copy prevention. Beyond this point, it gets...
Read more
The methods discussed in my previous post are crude and ugly. Most of the time,...
Read more
Many web developers like to prevent their viewers from copying their text. While I do...
Read more