開発環境 Microsoft Visual C++ 2010 Express (SP1)
実行環境 Microsoft Windows XP Home Edition (SP3)
プロジェクトの種類 空の CLR プロジェクト
プロジェクト名 clrhello

clrhello.cpp
using namespace System;
using namespace System::Reflection;
 
int main()
{
	Console::WriteLine(L"hello, world");
	String^ s = Assembly::GetExecutingAssembly()->ImageRuntimeVersion;
	Console::WriteLine(L"アセンブリ作成CLRバージョン:{0}", s);
	Console::ReadLine();
	return 0;
}
 

出力
hello, world
アセンブリ作成CLRバージョン:v4.0.30319
最終更新:2012年09月14日 19:15