C preprocessor: Difference between revisions

Content deleted Content added
(Never mind, it can be parsed as "It can [process] and is used to...". Sorry!) Undid revision 1305899439 by 2604:3D08:687F:FEA0:C8F9:D44F:F00F:4E3F (talk)
Line 417:
 
#pragma endregion
</syntaxhighlight>
 
=== Using ===
[[C++/CLI]] has the <code>#using</code> directive, which is used to import metadata into a program from a Microsoft Intermediate Language file (such as a {{mono|.dll}} file).<ref>{{Cite web|url=https://learn.microsoft.com/en-us/cpp/preprocessor/hash-using-directive-cpp|publisher=learn.microsoft.com|date=29 June 2022}}</ref>
 
<syntaxhighlight lang="++">
#using <MyComponent.dll>
#using "AssemblyA.dll"
#using "AssemblyB.dll"
 
using namespace System;
 
public ref class B {
public Test(A a) {
// ...
}
};
 
int main(array<String^>^ args) {
A a;
B b;
B.Test(a);
}
</syntaxhighlight>