[英]how can i use c++11 style callbacks in c# with swig
我有以下c ++回調代碼:
std::function<void(unsigned int channel, int value)> onCounterChange;
我需要添加到.i文件中才能在C#中使用它?
您可以定義以下委托來使用:
delegate void OnCounterChange(int channel, int value);
這將是回調:
OnCounterChange onCounterChange;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.