这样做没有数据丢失,那么为什么必须明确地将枚举转换为整数?
如果它是隐含的,那么它是不是更直观,比如当你有更高级别的方法时:
PerformOperation ( OperationType.Silent type )
Run Code Online (Sandbox Code Playgroud)
在哪里PerformOperation调用一个被暴露的包装C++方法:
_unmanaged_perform_operation ( int operation_type )
Run Code Online (Sandbox Code Playgroud)