将long转换为int不确定为什么结果

Aar*_*ron -3 c# long-integer

所以我将一个long转换为int.长号是1302165637746283555,它作为int转换为1537778179.我一直无法找到有关它为什么这样做的文档.它是如何得出第二个数字的,有没有办法将int数转换回长数?这是我的代码.

DateTime creationTime = File.GetCreationTime(@"c:\windows\setupact.log");
FILETIME fl1 = new FILETIME();
            fl1.dwLowDateTime = unchecked((int)creationTime.ToFileTime());
Run Code Online (Sandbox Code Playgroud)

Cra*_* W. 9

将a long转换为int may(并且在这种情况下将会)导致数据丢失.无法将丢失的数据丢回.所以不,在你的情况下,没有办法从long转换为int并再返回.

你问的相当于,"我把一桶五加仑的水倒进一个三加仑的桶里.有没有办法让五加仑的水再次回来?"

  • 很好地把 - 虽然它是六加仑桶三加仑桶:) (3认同)