__identifier
Visual Studio .NET 2003
Enables the use of C++ keywords as identifiers.
__identifier(C++_keyword)
Remarks
The __identifier keyword enables the use of C++ keywords as identifiers. The main purpose of this keyword is to allow managed classes to access and use external classes that may use a C++ keyword as an identifier. For more information on __identifier, see 22 __identifier Keyword.
Note Use of the __identifier keyword for identifiers that are not keywords is permitted, but strongly discouraged as a matter of style.
Example
In the following example, a C# class (called template) is created and assigned to pTemplate:
// identifier_template.cs
// compile with: /target:library
public class template
{
public void Run()
{
}
}
// keyword__identifier.cpp
// compile with: /clr
#using <mscorlib.dll>
#using <identifier_template.dll> // defines a C# class called template
int main()
{
__identifier(template) *pTemplate = new __identifier(template)();
pTemplate->Run();
return 0;
}