Updated C# all-in-one file

Thanks to everyone who came up with suggestions on my Did I miss any C# syntax construct? post. The updated file is below. #error Error message#warning Warning message#pragma warning disable 414, 3021#pragma warning restore 3021#line 6#line 2 “test.cs”#line default#line hidden#define foo#if foo#else#endif#undef foo extern alias Foo; using System;using System.Collections.Generic;using System.Linq;using System.Linq.Expressions;using System.Text;using M = System.Math; #if DEBUG…


Did I miss any C# syntax construct?

Dear readers, I’m asking for your valuable input again. I went through some of our test files and combined a single “all-in-one” C# syntax file that I want to contain all C# 4.0 constructs. I’m specifically not looking for combinations (because there’s an infinite number, obviously), it’s enough to just mention each syntax construct once….


Reflection with dynamic

This past summer the Visual C# IDE team was fortunate enough to have Paul van Brenk intern with us. Paul is a great guy and an experienced .NET developer from Rotterdam, Netherlands, who is interested in Azure, cloud computing and many other things. He also happens to be one of the contributors for dasBlog, which…

Should Call Hierarchy display compiler-generated member calls?

[A quick reminder, Call Hierarchy is a new IDE feature in VS 2010] In the comments to the previous post, a reader is asking: But why are the query operator method calls ignored by the Call Hierarchy? var r = from i in new[] { 1, 2, 3 }        where i > 1       …


Visual Studio 2010 Beta 1 is out!

In case you missed it (which I don’t believe), today we released Visual Studio 2010 Beta 1 to MSDN subscribers. On Wednesday, it will become available for everyone else to download. The build is much more stable and fleshed out then the early CTP preview – I’d say, the functionality of Visual Studio 2010 is…


A simple sample for C# 4.0 ‘dynamic’ feature

Earlier I posted some code to start Visual Studio using C# 3.0: using System; using EnvDTE; class Program { static void Main(string[] args) { Type visualStudioType = Type.GetTypeFromProgID("VisualStudio.DTE.9.0"); DTE dte = Activator.CreateInstance(visualStudioType) as DTE; dte.MainWindow.Visible = true; } } Now here’s the code that does the same in C# 4.0: using System; class Program {…


What’s common between C# 4.0 optional parameters, object initializers, the new WPF code editor and the navigation bar comboboxes?

I found an interesting bug recently which resulted from a pretty weird constellation of the following Visual Studio features: C# 4.0 optional parameters object initializer syntax the VS code editor rewritten from scratch in managed code and WPF the navigation bar combobox updated to show default values for optional parameters Here’s the screenshot of the…


Call Hierarchy Navigation in Visual Studio 2010

We’re currently designing a new IDE feature named Call Hierarchy. Essentially, it allows you to find places where a given method is called, which is similar to how Find All References currently works. However, unlike Find All References, the Call Hierarchy feature provides more deep understanding and more detailed information about calls. Invocation You can…


New IDE features in VS 2010

We have announced a list of new IDE features for managed languages in Visual Studio 2010: http://blogs.msdn.com/somasegar/archive/2008/12/19/code-focused-development-in-vs-2010.aspx

Links about Visual Studio 2010 and C# 4.0

A while ago we announced Visual Studio 2010 and C# 4.0. In case you’d like to catch up and read articles or watch videos about the upcoming new features, I wanted to gather some links here. PDC https://channel9.msdn.com/pdc2008/ is a great link about PDC, where you can watch a lot of interesting videos, such as:…