Questions tagged «uint»

7
使用C ++获取Unix时间戳
如何uint在C ++中获得Unix时间戳?我已经用Google搜索了一下,似乎大多数方法都在寻找更复杂的方法来表示时间。我不能只是把它当作uint?
71 c++  unix  timestamp  uint 

3
未检查的uint的C#溢出行为
我已经在https://dotnetfiddle.net/测试此代码: using System; public class Program { const float scale = 64 * 1024; public static void Main() { Console.WriteLine(unchecked((uint)(ulong)(1.2 * scale * scale + 1.5 * scale))); Console.WriteLine(unchecked((uint)(ulong)(scale* scale + 7))); } } 如果我使用.NET 4.7.2进行编译,则会得到 859091763 7 但是如果我使用Roslyn或.NET Core,我会得到 859091763 0 为什么会这样?
10 c#  .net  overflow  roslyn  uint 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.