다음을 통해 공유


UInt16.MaxValue 필드

UInt16의 최대값을 나타냅니다. 이 필드는 상수입니다.

이 필드는 CLS 규격이 아닙니다.  

네임스페이스: System
어셈블리: mscorlib(mscorlib.dll)

구문

‘선언
Public Const MaxValue As UShort
‘사용 방법
Dim value As UShort

value = UShort.MaxValue
public const ushort MaxValue
public:
literal unsigned short MaxValue
public static final UInt16 MaxValue
public const var MaxValue : ushort

설명

이 상수의 값은 65535(16진수 0xFFFF)입니다.

예제

public class Temperature {
    public static ushort MinValue {
        get {
            return UInt16.MinValue;
        }
    }

    public static ushort MaxValue {
        get {
            return UInt16.MaxValue;
        }
    }

    // The value holder
    protected ushort m_value;

    public ushort Value {
        get {
            return m_value;
        }
        set {
            m_value = value;
        }
    }

}
   public ref class Temperature
   {
   protected:

      // The value holder
      short m_value;

   public:

      static property short MinValue 
      {
         short get()
         {
            return UInt16::MinValue;
         }

      }

      static property short MaxValue 
      {
         short get()
         {
            return UInt16::MaxValue;
         }

      }

      property short Value 
      {
         short get()
         {
            return m_value;
         }

         void set( short value )
         {
            m_value = value;
         }

      }

      property short Celsius 
      {
         short get()
         {
            return (short)((m_value - 32) / 2);
         }

         void set( short value )
         {
            m_value = (short)(value * 2 + 32);
         }

      }

   };

}
public class Temperature
{
    /** @property 
     */
    public static int get_MinValue()
    {
        return System.Convert.ToInt16(UInt16.MinValue);
    } //get_MinValue

    /** @property 
     */
    public static int get_MaxValue()
    {
        return System.Convert.ToInt16(UInt16.MaxValue);
    } //get_MaxValue

    // The value holder
    protected int mValue;

    /** @property 
     */
    public int get_Value()
    {
        return mValue;
    } //get_Value

    /** @property 
     */
    public void set_Value(int value)
    {
        mValue = value;
    } //set_Value
} //Temperature
public class Temperature {
    public static function get MinValue() : ushort {
        return UInt16.MinValue;
    }

    public static function get MaxValue() : ushort {
        return UInt16.MaxValue;
    }

    // The value holder
    protected var m_value : ushort ;

    public function get Value() : ushort {
        return m_value;
            }
            
            public function set Value(value : ushort) {                        
        m_value = value;
    }

}

플랫폼

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

.NET Compact Framework

2.0, 1.0에서 지원

참고 항목

참조

UInt16 구조체
UInt16 멤버
System 네임스페이스
MinValue