Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Managed Types and the main Function (C++/CLI).
When writing an application using /clr, the arguments of the main() function cannot be of a managed type.
An example of a proper signature is:
// managed_types_and_main.cpp
// compile with: /clr
int main(int, char*[], char*[]) {}