Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要帮助在 C# 中查找整数的 32 位二进制表示。在 Perl 中,我使用unpack("B32", pack("N", $arg)).
unpack("B32", pack("N", $arg))
提前致谢。
像这样的东西:
int x = some_value; var networkOrder = IPAddress.HostToNetworkOrder(x); var result = Convert.ToString(networkOrder, 2).PadLeft(32, '0');
详情请参考类似问题。