Results 1 to 5 of 5

Thread: How to execute a program in C#?

  1. #1
    Join Date
    Dec 2010
    Posts
    3

    How to execute a program in C#?

    Hello friends, I wanted to know that how can we execute a program in C#? I am a new beginner in C#, and I have struck in the basic step of executing the program. I tried it but still I am not able to get it done perfectly. I am using this language for the first time so, I am not aware of executing a program in C sharp. If anyone who is aware or knows how to execute a c sharp program then please let know as soon as possible.

  2. #2
    Join Date
    May 2009
    Posts
    511

    Re: How to execute a program in C#?

    I think that executing a C# program is the most simplest. It can be easily achieved after creating the program i.e. writing the source code, save the file with .cs extension in a folder on your system i.e program_name.cs
    Go to the folder where your file is saved and compile the program using csc program_name.cs . by this, a executable file will be generated, if there are no errors in the program.

  3. #3
    Join Date
    May 2009
    Posts
    637

    Re: How to execute a program in C#?

    You don't have to be panic if you are getting an error. If there are some errors, appropriate error messages will be displayed and you have to correct the error and then compile the program again. The executable file will be generated in the same folder that of the program which is program_name.exe
    For executing the program, run the file in command prompt, note that there is no extension for the program_name.

  4. #4
    Join Date
    Apr 2009
    Posts
    488

    Re: How to execute a program in C#?

    Documentation section must contain the name, date, program name, other details, name of classes etc. Using directive section may contain the names of Namespaces that are to be added in the program. An interface is similar to a class but contains only abstract members. Interfaces are used during implementing the concept of multiple inheritances in a program. Classes are the primary and essential elements of a C# program. The number of classes depends on the complexity of the problem. C# application program requires a Main method as its starting point, the class containing the main is the essential part of the program.

  5. #5
    Join Date
    May 2009
    Posts
    527

    Re: How to execute a program in C#?

    I think that for executing a C # sharp program you can follow the five steps in which it defines the sequence in which the C sharp program should be.
    The five steps are
    1.>Documentation section
    2.>Using directive section
    3.>Interfaces section
    4.>Classes section
    5.> Main Method Section
    Using this steps you can easily know how to create the C sharp programs and in which sequence it should be.

Similar Threads

  1. What are the steps to execute Visual basic program?
    By Asis in forum Software Development
    Replies: 3
    Last Post: 02-01-2011, 08:22 AM
  2. Compile and execute a program in java
    By ISAIAH in forum Software Development
    Replies: 5
    Last Post: 03-03-2010, 01:07 PM
  3. How to execute a c++ program from EditPlus
    By LikiFerio in forum Software Development
    Replies: 3
    Last Post: 20-06-2009, 06:26 PM
  4. how to execute C#.NET program?
    By ruby1234 in forum Software Development
    Replies: 2
    Last Post: 19-11-2008, 02:24 PM
  5. Unable to find or execute SynthCore11.EXE Program
    By Pyrotechnic in forum Windows Software
    Replies: 2
    Last Post: 26-08-2008, 06:00 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,946,329.38655 seconds with 17 queries