Results 1 to 2 of 2

Thread: Compile from Command Line

  1. #1

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Compile from Command Line

    Strange how quickly I can forget simple stuff if I don't use it.

    Been playing around writing some C# code in a text editor, and compile them from the command line. Just playing for the fun.

    Anyhow, I forgot how to go about and compile something like this:
    Code:
    using System;
    public class Time
    {
    // public methods
    public void DisplayCurrentTime( )
     {
      Console.WriteLine("stub for DisplayCurrentTime");
     }
    // private variables
     int Year;
     int Month;
     int Date;
     int Hour;
     int Minute;
     int Second;
    }
    public class Tester
     {
     static void Main( )
     {
      Time t = new Time( );
      t.DisplayCurrentTime( );
     }
    }
    guess I should create another account for such silly questions making my name gats, but then, that is frown upon here on the forums.
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  2. #2
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690

    Re: Compile from Command Line

    csc.exe is the C# compiler - also take a look at this gui tool to help with command line options - http://www.codeproject.com/csharp/csccmdlgen.asp

    Mike

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width