C# ASP.NET SQL SERVER

Order of Usings in C#

Something strange with Visual Studio 2008. I was trying to use LINQ in a class in an Excel Addin that I was writing and setup the using statements as follows:

using System;
using System.Collections.Generic;
using System.Text;
using Excel = Microsoft.Office.Interop.Excel;
using System.Reflection;
using System.Linq;

Would not compile and no intellisense.

I re-arranged the usings like this:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Excel = Microsoft.Office.Interop.Excel;
using System.Reflection;

It compile and I received intellisense.

Out of curiosity I changed the usings back to how they originally were with the System.Linq at the end and this time VS2008 compiled it.

A bit weired - not sure what's happening here...

» Similar Posts

  1. type or namespace name 'ProfileCommon' could not be found
  2. AZGroups Forward/Back Button History and jQuery
  3. Mix 09 TenK Challenge

» Trackbacks & Pingbacks

    No trackbacks yet.
Trackback link for this post:
http://guyellisrocks.com/trackback.ashx?id=41

» Comments

    There are no comments. Kick things off by filling out the form below.

» Leave a Comment