开发者

Why is FileInfo.Length of type "long"?

开发者 https://www.devze.com 2023-03-18 09:23 出处:网络
I was just wondering whether anyone knows why the property FileInfo.Length is of type long instead of ulong? I don\'t think the size o开发者_如何学运维f a file can ever be negative.

I was just wondering whether anyone knows why the property FileInfo.Length is of type long instead of ulong? I don't think the size o开发者_如何学运维f a file can ever be negative.

Was this a general design decision for the .NET framework, since other length properties (e.g. string.Length) are also of type long?


ulong isn't a CLS-compliant type. The framework tends to use CLS-compliant types where possible.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号