int 和 unit 有什么区别

 //
        // 摘要:
        //     Represents the largest possible value of an System.Int32. This field is constant.
        public const Int32 MaxValue = 2147483647;
        //
        // 摘要:
        //     Represents the smallest possible value of System.Int32. This field is constant.
        public const Int32 MinValue = -2147483648;
//
        // 摘要:
        //     Represents the largest possible value of System.UInt32. This field is constant.
        public const UInt32 MaxValue = 4294967295;
        //
        // 摘要:
        //     Represents the smallest possible value of System.UInt32. This field is constant.
        public const UInt32 MinValue = 0;

 

今天看代码,发现源码中有uint这个类型,我就想看看int 和uint有什么区别:

最终结果:int 是有负值的,而uint是从0开始的

posted on 2022-04-20 11:30  泰坦尼克号上的活龙虾  阅读(608)  评论(0)    收藏  举报

导航