浏览System.Double
的源代码时,我遇到了这种方法:
[SecuritySafeCritical]
internal static unsafe bool IsNegative(double d)
{
return (*(long*) &d & long.MinValue) == long.MinValue;
}
在System.Double
结构中的任何地方似乎都没有使用它。在其他地方使用了吗?
由于我的计算机上没有C#标准库的完整源代码,因此我不能简单地通过Visual Studio浏览对其的引用。我还发现了this API documentation for it,但没有说明为什么要使用它。