Advertisement

c# error

Started by July 16, 2000 03:43 PM
2 comments, last by helphme 24 years, 5 months ago
hi i just downloaded the c# stuff from microsoft but i cant get even a simple "hellow orld" program to work, when i compile it i get "bad command or filename" here is my code :-

using System;
class Hello
{
static void Main() {
Console.WriteLine("hello");
}
}
 
Do you need a semi colon at the end of your class declaration like in c++. For instance:

class myClass
{
public:
myClass();
~myClass();
};

Random Task
Advertisement
I believe what Mr. Task was saying, is try this (though I have no clue about C# myself).

using System;
class Hello
{
static void main()
{
Console.WriteLine("Hello!");
}
};




- Goblin
"In order to understand the full depth of mankind, you must first seperate the word into its component parts: 'mank' and 'ind'."
- The Goblin (madgob@aol.com)
"bad command or filename" sounds like a DOS/Windows-Console error.
Are you sure that you''re in the directory containing the compiler, or that you have it in your PATH environemnt variable, when you issue the compile command...

This topic is closed to new replies.

Advertisement