【发布时间】:2016-10-23 19:05:45
【问题描述】:
我正在通过 ILSPY 阅读 AForge.Video.FFMPEG 程序集中的 VideoFileWriter 类(我很想看看特定方法是如何工作的)并发现了这个:
public bool IsOpen {
[return: MarshalAs(UnmanagedType.U1)]
get {
return ((this.data != null) ? 1 : 0) != 0;
}
}
将 bool 转换为整数而不是返回 bool 转换的原因是什么,而不是只做 this.data != null?
【问题讨论】:
-
尝试与 JustDecompile 比较
-
或者试试 DotPeek