From the command line, type dir
to see what's in your current directiory. If sample.cs
and the appropriate .DLL
are there, you should be set to go.
To see what version of .NET you have, you can just type clrver
in the Visual Studio Command Prompt. Just FYI, if you see version 2.0, that'll actually be 3.5 in this case (.NET 3.5 actually compiles on the 2.0 compiler, while 4.0 is an entirely different thing).
And a breakdown of the command:
csc // C Sharp Compiler
/reference // Reference a DLL not in the GAC
/platform // Compile for 32bit or 64bit?
/target // Producing a DLL or EXE?
Sample.cs // File to actually compile