Managed C++ ref class

Basically, a ref class is a CLR class. It’s the equivalent of class in C#.

This creates a reference type managed by the CLR. If you want to make a class that’s usable from C#, you’d normally create a ref class. (ref struct, by the way, does exactly the same thing, but with C++’s standard class vs. struct default accessibility rules.)

Also, just for reference – in order to make a value type (struct in C#), you’d use value class or value struct.

A good explanation of many of these new keywords is Herb Sutter’s post on C++/CLI Keywords. This is a useful reference if you’re new to C++/CLI, but have a solid C++ background.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)