Visual C++ .NET/Language Basics/namespace

Материал из .Net Framework эксперт
Перейти к: навигация, поиск

Hello world without namespace

<source lang="csharp">

  1. include "stdafx.h"

int main() {

  System::Console::WriteLine("Hello, World!");

}

 </source>


Using System namespace

<source lang="csharp">

  1. include "stdafx.h"
  2. using "mscorlib.dll"

using namespace System; int main() {

  Console::WriteLine("Hello World!");

}

 </source>