// compile with: /clr
#include "stdafx.h"
#include <vcclr.h>
using namespace System;
#pragma unmanaged
class NativeTypeNativeCode {
public:
NativeTypeNativeCode( gcroot<String^> s ) {m_s = s;}
gcroot<String^> m_s;
};
#pragma managed
int main() {
NativeTypeNativeCode * obj = new NativeTypeNativeCode("Hello");
Console::WriteLine( obj->m_s );
delete obj;
}