This compiles well for me – However other people on a different thread are saying that protected classes cannot be declared in c# at top level
Is that the case?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
protected class CsvReader
{
}
}
It doesn’t compile for me with either VS2008SP1 or VS2010 (using csc.exe from the command line in both cases).
Which compiler are you using?
From section 3.5.1 of the C# specification: