سؤال

Is it possible to define a public void at the namespace scope (that can pass through ABI and later be used inside an JavaScript project)? Of course, "public void update(int param);" doesn't work as public seems to be invalid keyword in this context. The alternative is to make a class to hold that method but I would like to avoid that and have a function at the namespace scope.

Thanks

هل كانت مفيدة؟

المحلول

No, you cannot have a namespace-scope function that goes across the ABI. I recommend making a wrapper class and making the function a static.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top