Introduction to Code Contracts [Melitta Andersen]

This blog post is to provide a bit more detail about the Code Contracts feature that was recently announced at the PDC and in Justin’s blog entry, and that can be found in the Visual Studio 2010 and .NET Framework 4.0 CTP.  I’ll include some information on what can be found in the CTP, some…


What’s New in the BCL in .NET 4.0 CTP [Justin Van Patten]

The Visual Studio 2010 and .NET Framework 4.0 CTP is available for download as of last week.  The CTP contains new functionality throughout the .NET Framework, including several new BCL features and improvements: Code ContractsSystem.Diagnostics.Contracts provides a language-agnostic way to express coding assumptions in .NET programs.  The contracts take the form of pre-conditions, post-conditions, and…


BCL Team at PDC 2008 [Justin Van Patten]

Melitta, Kim, and I will be at PDC next week, along with several other members of the CLR team.  We’ll mostly be hanging out in the lounges chatting with folks and answering questions.  We’ll also be at the Ask-the-Experts night on Wednesday, so if you’ll be at PDC next week, stop by and say hi! …


The Compare Contract [Kim Hamilton]

A breaking change? We recently heard from a customer who observed different sorting behavior in .NET FX 3.5 SP1 compared to 3.5 RTM. The different behavior was demonstrated with the following code. The class StringWrapper provided a custom sort in which nulls (null StringWrapper references) were moved to the end of the array. To achieve…


Long Paths in .NET, Part 3 of 3 Redux [Kim Hamilton]

My original part 3 blog caused confusion, mostly because it didn’t tie together loose ends and explain that an immediate .NET “solution” is at best partial. To minimize confusion and answer questions in the comments, I decided to do a complete overhaul and link to the original (here). Win32 file-naming conventions include the MAX_PATH (260…


P/Invoke Interop Assistant [Justin Van Patten]

The Interop team recently released a new tool called the P/Invoke Interop Assistant.  This tool automatically generates managed p/invoke declarations (in C# or VB) from native signatures.  It includes a quick look-up for the common Win32 libraries and lets you generate p/invoke declarations for any other native library simply by passing it the native signature. …


.NET Framework Developer Documentation Survey [Matthew Connelly]

Help us improve the developer documentation by taking the Visual Studio and .NET Framework Developer Documentation Survey. This survey will give us a better understanding of the type of applications you are developing, how you use help, and how we can improve it. The survey takes only 10 minutes, and we appreciate your feedback!


Long Paths in .NET, Part 3 of 3 [Kim Hamilton]

Updated 6/10/08 2:20pm: clarified details of proposed solution Here it is, Part 3 of the long path series, which started over a year ago. I apologize for leaving you hanging; the BCL team has been busy lighting up the web. Because of the delay, I’ll summarize the compatibility concerns as context for the proposed solution….


.NET Framework Client Profile [Justin Van Patten]

Last week Soma and Scott Guthrie announced the availability of Visual Studio 2008 and .NET Framework 3.5 SP1 Beta.  As part of this release, we’re introducing the .NET Framework Client Profile, a smaller .NET Framework redist optimized for .NET client applications.  The new redist weighs in at around 26.5 MB, enabling a smaller, faster, more…


Working with Signed Non-Decimal and Bitwise Values [Ron Petrusha]

Recently, a number of questions have surfaced about the accuracy of the .NET Framework when working with the binary representation of numbers. (For example, see The issue surfaces most clearly when we convert the hexadecimal or octal string representation of a numeric value that should be out of range of its target data type…