Compiling C sharp program

This is a discussion on Compiling C sharp program within the C# Programming forums, part of the General Programming Boards category; what is the command for compiling and running the c sharp program? I wrote a program and compiled it using ...

  1. #1
    Registered User
    Join Date
    Jul 2009
    Posts
    53

    Compiling C sharp program

    what is the command for compiling and running the c sharp program?
    I wrote a program and compiled it using mcs filename.cs
    But I don't know how to run the program. I tried mono filename.exe but didn't work out. So need help.

  2. #2
    Registered User
    Join Date
    Jul 2009
    Posts
    53
    Code:
    WeatherStation station, DateTime predictionDate
    can we define the variables in c sharp like this?i am looking through some codes here and while compiling got the error saying"are you missing a using directive or an assembly reference cs0246"
    and it is showing error for this variables. I tried to remove it but the program have used the variable name station and predictionDate in the program. So can you help me out?

  3. #3
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    You separate statements with semicolon ( ; ), not comma ( , )
    so:
    Code:
    WeatherStation station;
    DateTime predictionDate;
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  4. #4
    Registered User
    Join Date
    Jul 2009
    Posts
    53
    i tried but it is still showing the same errors. like the program is using it like this

    Code:
    static void Main(WeatherStation station,	DateTime predictionDate)

  5. #5
    Webhead Spidey's Avatar
    Join Date
    Jul 2009
    Posts
    285
    Main does not take custom parameters.

    Code:
    static void Main()
    {
    //...
    }
    Spidey out!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with my program...
    By Noah in forum C Programming
    Replies: 2
    Last Post: 03-11-2006, 07:49 PM
  2. adding an #include stops my program from compiling
    By angelscars in forum C++ Programming
    Replies: 5
    Last Post: 11-11-2005, 05:24 PM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 07:39 AM
  4. Replies: 3
    Last Post: 04-19-2004, 09:09 AM
  5. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 11:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21