.NET Framework Class Library
UInt32..::.MinValue Field

Represents the smallest possible value of UInt32. This field is constant.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)
Syntax

Visual Basic (Declaration)
Public Const MinValue As UInteger
Visual Basic (Usage)
Dim value As UInteger

value = UInteger.MinValue
C#
public const uint MinValue
Visual C++
public:
literal unsigned int MinValue
JScript
public const var MinValue : uint
Remarks

The value of this constant is 0.

Examples

The following example demonstrates how to use the MinValue field to display the smallest possible value of a UInt32 variable.

Visual Basic
   Public Class Temperature 
        ' The value holder
        Protected m_value As UInteger

        Public Shared ReadOnly Property MinValue As UInteger
            Get 
                Return UInt32.MinValue
            End Get
        End Property

        Public Shared ReadOnly Property MaxValue As UInteger
            Get 
                Return UInt32.MaxValue
            End Get
        End Property

        Public Property Value As UInteger
            Get 
                Return Me.m_value
            End Get
            Set 
                Me.m_value = value
            End Set
        End Property
   End Class
C#
    public class Temperature {
        public static uint MinValue {
            get {
                return UInt32.MinValue;
            }
        }

        public static uint MaxValue {
            get {
                return UInt32.MaxValue;
            }
        }

        // The value holder
        protected uint m_value;

        public uint Value {
            get {
                return m_value;
            }
            set {
                m_value = value;
            }
        }
    }
Visual C++
   public ref class Temperature
   {
   public:
      static property UInt32 MinValue 
      {
         UInt32 get()
         {
            return UInt32::MinValue;
         }
      }

      static property UInt32 MaxValue 
      {
         UInt32 get()
         {
            return UInt32::MaxValue;
         }
      }

   protected:
      // The value holder
      UInt32 m_value;

   public:
      property UInt32 Value 
      {
         UInt32 get()
         {
            return m_value;
         }
         void set( UInt32 value )
         {
            m_value = value;
         }
      }
   };
}
JScript
    public class Temperature {
        public static function get MinValue() : uint {
            return UInt32.MinValue;
        }

        public static function get MaxValue() : uint {
            return UInt32.MaxValue;
        }

        // The value holder
        protected var m_value : uint ;

        public function get Value() : uint {
            return m_value;
                }

                public function set Value(value : uint) {                        
            m_value = value;
        }

    }
Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 3.5, 2.0, 1.0

XNA Framework

Supported in: 3.0, 2.0, 1.0
See Also

Reference

Tags :


Page view tracker