namespace Managed_DLL { public ref class AController { public: delegate void didChangeListenerStatus(tListenerStatus status); .... } // header file #if defined(_MANAGED) namespace Managed_DLL { #define ENUMKEYWORD public enum #else #define ENUMKEYWORD typedef enum #endif ENUMKEYWORD tListenerStatus { kListenerStopped, kListenerRunning, kListenerFailed } ; }
using Managed_DLL .... public void didChangeListenerStatus(tListenerStatus status) { Console.WriteLine(" didChangeListnerStatus called"); }
Error 4 'tListenerStatus' is inaccessible due to its protection level
Error 3 Inconsistent accessibility: parameter type 'tListenerStatus' is less accessible than method 'ADemo.ViewController.didChangeListenerStatus(tListenerStatus)
Error 6 The type or namespace name 'tListenerStatus' could not be found (are you missing a using directive or an assembly reference?)
public ENUMKEYWORD tListenerStatus { kListenerStopped, kListenerRunning, kListenerFailed } ;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)