Winterdom

C++/CLI FAQ

This is a FAQ I started for C++/CLI (managed programming language for Visual C++ 2005). Here are the contents so far:

Basic Language Elements
  1. Getting a Type^ for a class
  2. Trivial Properties
  3. Ref and Out arguments on methods
  4. Boxing in C++/CLI
  5. How to declare methods with var arg lists
  6. What's the equivalent of C#'s "readonly" in C++/CLI?
  7. Passing stack allocated objects of ref types to functions expecting managed handles
Compiling
  1. The /clr and /MT switches are incompatible
  2. How to detect compilation with /clr?
  3. Compiling C++/CLI and MC++ code
  4. XML Comments
Handling Resources
  1. How to dispose of objects
  2. Creating types that support IDisposable
Templates and Generics
  1. How can I specify an interface constraint on a generic type?
  2. How can I specify a constructor constraint on a generic type?