问个很弱智的C#的问题在某个Visual Studio .Net的教材上看到了这样的Hello World的Code,但是在VC6里死活也不能compile.请问是为什么?难道只有VS.Net才可以?谢了
using System;
class Welcome
{
static void Main()
{
Console.WriteLine("Please Enter Your Name:");
string name = Console.ReadLine();
Console.WriteLine("Welcome to you, {0}!", name);
}
}
DEBUG:
error C2873: 'System' : symbol cannot be used in a using-declaration
fatal error C1004: unexpected end of file found
some basic understanding
you are attempting to use the class libraries("System" namespace) provided by the .NET framework.
The .NET framework is not provided for Visual C++ 6.
Hence, the code fails.
Note: Visual Studio.NET is an IDE to develop .NET applications. Without it, you can still leverage on all aspects of the .NET framework .
The .NET framework is not provided for Visual C++ 6.
Hence, the code fails.
Note: Visual Studio.NET is an IDE to develop .NET applications. Without it, you can still leverage on all aspects of the .NET framework .
Freedom is slavery.
Ignorance is strength.