DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: execution problem in running a simple program.

Hybrid View

  1. #1
    shrijeet Guest

    execution problem in running a simple program.


    Hello! friends

    I am new to C sharp programming language. When I execute the below written
    code I get error:

    using System;
    class Hello
    {
    static void Main() {
    Console.WriteLine("Hello, world");
    }
    }

    I save the above code as hello.cs.

    When I compile the following code at DOS prompt:

    csc hello.cs

    I get no error message and hello.exe should be generated, but I can't find
    it...


    Please help regarding this matter......

  2. #2
    Morten Dahl Guest

    Re: execution problem in running a simple program.


    Strange, but try using the /out:<file> parameter when compiling the program:

    csc /out:"C:\Hello.exe" hello.cs

    It should work and put the .exe file on your C-drive

    Morten


    "shrijeet" <shrijeet@xlnce.com> wrote:
    >
    >Hello! friends
    >
    >I am new to C sharp programming language. When I execute the below written
    >code I get error:
    >
    >using System;
    >class Hello
    >{
    > static void Main() {
    > Console.WriteLine("Hello, world");
    > }
    >}
    >
    >I save the above code as hello.cs.
    >
    >When I compile the following code at DOS prompt:
    >
    > csc hello.cs
    >
    >I get no error message and hello.exe should be generated, but I can't find
    >it...
    >
    >
    >Please help regarding this matter......



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center