IT lexicon › Programming › C++/CLI

C++/CLI

Programming På svenska → Updated: 2026-10-02

Microsoft's dialect of C++ that speaks directly to the .NET runtime — the glue language when old C++ has to meet new managed code.

Introduced with Visual Studio 2005 and standardised as ECMA-372, replacing the widely disliked Managed Extensions for C++. The novelty was handle syntax: String^ s = gcnew String("hello"), where ^ denotes a reference to an object on the garbage-collected heap and gcnew allocates there rather than on the native one.

Actual usage is narrow but persistent: a single C++/CLI file can include a twenty-year-old C header and call a C# class in the same translation unit, which makes it the standard way to wrap native libraries for .NET. The cost is that the language is Windows-only, and .NET Core support did not arrive until 2019. Nobody writes whole programs in it by choice.

← Back to the lexicon