Search code examples
c#c++-climanagedref

Hide some methods in ref class


I've a class in Managed C++ which is exposed to .NET environment (i.e. class is declared as ref class and therefore is visible to C# project).

And I need one of the public methods of this class to be hidden from C# user. This method will be used to access some internal data of the class but only internally in Managed C++.

Is it possible?


Solution

  • You may define the method with access specifier internal.