@REM By unknown

@echo off
color 0A

cd %~p1

set _source_=
set _dll_=


if "%1" == "" goto COMPILE
if /i "%~x1"==".cs" goto SOURCE
if /i "%~x1"==".dll" goto DLL
goto SFT

if "%_source_%"=="" goto S2

set _source_=%_source_% %~nx1
goto SFT

set _source_=%~nx1
goto SFT

if "%_dll_%"=="" goto D2

set _dll_=%_dll_%,%~nx1
goto SFT

set _dll_=%~nx1
goto SFT

goto LOOP

set _compilerdir_=%WinDir%\MicroSoft.NET\Framework\v2.0.50727\
set _compiler_=%_compilerdir_%csc.exe /unsafe

if "%_dll_%"=="" goto C2

%_compiler_% /r:%_dll_% %_source_%
goto RESULT%errorlevel%

%_compiler_% %_source_%
goto RESULT%errorlevel%

echo -------------------------------------------
echo compileing %_source_% is failed!
echo -------------------------------------------
goto END


directly drag a single of filename.cs on its merits; automatically renewable make-up filename.exe or filename.exe dll.only just to add " /t:library"
after,drag the filename.exe on visual studio.net 200x Command Prompt.you will see the result.

jephthah commented: that's a harsh point reduction for a forum post mistake :( +9
Ancient Dragon commented: this isn't shell programming forum. -7