Click here to Skip to main content
15,889,861 members
Home / Discussions / C#
   

C#

 
GeneralRe: Sending a connection to another computer in a PEER TO PEER network Pin
Richard MacCutchan26-Aug-09 6:21
mveRichard MacCutchan26-Aug-09 6:21 
GeneralRe: Sending a connection to another computer in a PEER TO PEER network Pin
CoderForEver26-Aug-09 10:35
CoderForEver26-Aug-09 10:35 
GeneralRe: Sending a connection to another computer in a PEER TO PEER network Pin
Richard MacCutchan26-Aug-09 21:23
mveRichard MacCutchan26-Aug-09 21:23 
QuestionHow do you compile code from notepad? Pin
Nathan Revka20-Aug-09 9:27
Nathan Revka20-Aug-09 9:27 
AnswerRe: How do you compile code from notepad? Pin
Pete O'Hanlon20-Aug-09 9:34
mvePete O'Hanlon20-Aug-09 9:34 
AnswerRe: How do you compile code from notepad? Pin
Christian Graus20-Aug-09 11:44
protectorChristian Graus20-Aug-09 11:44 
GeneralRe: How do you compile code from notepad? Pin
PIEBALDconsult20-Aug-09 12:55
mvePIEBALDconsult20-Aug-09 12:55 
AnswerRe: How do you compile code from notepad? Pin
PIEBALDconsult20-Aug-09 12:54
mvePIEBALDconsult20-Aug-09 12:54 
It's not difficult and more developers should learn to do it; it's a very useful tool to have.

When you install .net, the C# and VB.net compilers are installed as well (these are the same compilers that Visual Studio uses).

0. Open a DOS box; there are at least two ways to do this:
Start|Run cmd
Start|Programs|Accesories|Command prompt

Because I use a DOS box extensively I have it on my Quick launch toolbar

1. Determine which versions of the compiler you have:

C:\>dir /s /b "c:\windows\microsoft.net\framework\csc.exe
c:\windows\microsoft.net\framework\v1.1.4322\csc.exe
c:\windows\microsoft.net\framework\v2.0.50727\csc.exe
c:\windows\microsoft.net\framework\v3.5\csc.exe
 
C:\>


2. Execute the compiler of your choice, specifying your source code as a parameter:

C:\>c:\windows\microsoft.net\framework\v3.5\csc.exe Hello.cs
Microsoft (R) Visual C# 2008 Compiler version 3.5.30729.1
for Microsoft (R) .NET Framework version 3.5
Copyright (C) Microsoft Corporation. All rights reserved.

C:\>


3. Execute the program:

C:\>hello
Hello, world!

C:\>


4. If you do this frequently, you may want to write a BAT file to do this:

C:\>type csc.bat
@c:\windows\microsoft.net\framework\v3.5\csc.exe %*

C:\>


5. And/or add the compiler's directory to the Path environment variable
Start|Settings|Control panel|System|Advanced|Environment variables|System variables|Path|Edit
AnswerRe: How do you compile code from notepad? Pin
Natural_Demon20-Aug-09 14:14
Natural_Demon20-Aug-09 14:14 
AnswerRe: How do you compile code from notepad? Pin
darkelv20-Aug-09 15:38
darkelv20-Aug-09 15:38 
GeneralRe: How do you compile code from notepad? Pin
dan!sh 20-Aug-09 18:49
professional dan!sh 20-Aug-09 18:49 
AnswerRe: How do you compile code from notepad? Pin
Richard MacCutchan25-Aug-09 10:38
mveRichard MacCutchan25-Aug-09 10:38 
QuestionProblem with play real-time audio signals Pin
hossein khatoonabadi20-Aug-09 9:25
hossein khatoonabadi20-Aug-09 9:25 
QuestionUser Control: Property use Pin
favianq20-Aug-09 9:22
favianq20-Aug-09 9:22 
AnswerRe: User Control: Property use Pin
Henry Minute20-Aug-09 11:48
Henry Minute20-Aug-09 11:48 
QuestionHow do I use external libraries in my project? (using <taglib>)</taglib> Pin
pietlut20-Aug-09 6:35
pietlut20-Aug-09 6:35 
AnswerRe: How do I use external libraries in my project? (using ) Pin
Saksida Bojan20-Aug-09 7:26
Saksida Bojan20-Aug-09 7:26 
AnswerRe: How do I use external libraries in my project? (using ) Pin
PIEBALDconsult20-Aug-09 7:57
mvePIEBALDconsult20-Aug-09 7:57 
AnswerRe: How do I use external libraries in my project? (using ) Pin
stancrm20-Aug-09 8:10
stancrm20-Aug-09 8:10 
AnswerRe: How do I use external libraries in my project? (using ) Pin
Wes Aday20-Aug-09 9:24
professionalWes Aday20-Aug-09 9:24 
QuestionHow to set the x & y axis fontsize in MSChart Pin
JohnQuar120-Aug-09 4:24
JohnQuar120-Aug-09 4:24 
AnswerRe: How to set the x & y axis fontsize in MSChart Pin
Luc Pattyn20-Aug-09 5:20
sitebuilderLuc Pattyn20-Aug-09 5:20 
GeneralRe: How to set the x & y axis fontsize in MSChart Pin
JohnQuar120-Aug-09 5:24
JohnQuar120-Aug-09 5:24 
GeneralRe: How to set the x & y axis fontsize in MSChart Pin
Luc Pattyn20-Aug-09 5:25
sitebuilderLuc Pattyn20-Aug-09 5:25 
GeneralRe: How to set the x & y axis fontsize in MSChart Pin
JohnQuar120-Aug-09 5:28
JohnQuar120-Aug-09 5:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.