C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » Visual Studio »

How to Run the C# file in visual studio command prompt


Posted Date: 03 Apr 2009    Resource Type: Articles    Category: Visual Studio
Author: Tamil MaranMember Level: Gold    
Rating: 1 out of 5Points: 3



How to Run the C# file in visual studio command prompt.


It’s a good practice. Starts learning the c# through command prompt. Now we see how to start, execute and run a c# program.

Step 1: open the visual studio command prompt (start => Microsoft visual studio=> visual studio tools =>visual studio command prompt).

Step 2: Type “notepad Filename.cs”.

Step 3: Once u finish the c# program save the file.

Step 4: use csc command to execute
Syntax : csc Filename.cs

Step 5: Enter the exe file name ( once u successfully execute the program. It automatically generate the exe file with the same file name. so type the same file name without extension)

Difference between Java and c#

In java javac filename.java comment create the class file with the class name. Then we can execute the java program by entering java classname.

Where as in c# csc command will create the exe file with the same name. By entering the filename alone we can run the program.







Responses

Author: aradhya    29 Apr 2009Member Level: Silver   Points : 1
great information, real it helped me in getting information regarding command prompt execution.
after compilation should we type
>filename.exe or wat plz specify it


Author: Tamil Maran    30 Apr 2009Member Level: Gold   Points : 1
After you are successfull compilation just enter the file name without extension (Extension is optional)


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Run  .  Execute  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Visual Studio 2008 new features
Previous Resource: Calling Similar Methods of two Interfaces from a Class.
Return to Discussion Resource Index
Post New Resource
Category: Visual Studio


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use