ParseUInt32() 정적인 개인적인 메소드

static private ParseUInt32 ( String value, NumberStyles options, NumberFormatInfo numfmt ) : UInt32
value String
options NumberStyles
numfmt NumberFormatInfo
리턴 UInt32
예제 #1
0
 public static uint Parse(string s)
 {
     if (s == null)
     {
         ThrowHelper.ThrowArgumentNullException(ExceptionArgument.s);
     }
     return(Number.ParseUInt32(s, NumberStyles.Integer, NumberFormatInfo.CurrentInfo));
 }
예제 #2
0
 public static uint Parse(string s, IFormatProvider?provider)
 {
     if (s == null)
     {
         ThrowHelper.ThrowArgumentNullException(ExceptionArgument.s);
     }
     return(Number.ParseUInt32(s, NumberStyles.Integer, NumberFormatInfo.GetInstance(provider)));
 }
예제 #3
0
 public static uint Parse(string s, NumberStyles style)
 {
     NumberFormatInfo.ValidateParseStyleInteger(style);
     if (s == null)
     {
         ThrowHelper.ThrowArgumentNullException(ExceptionArgument.s);
     }
     return(Number.ParseUInt32(s, style, NumberFormatInfo.CurrentInfo));
 }
예제 #4
0
 public static uint Parse(String s, NumberStyles style, IFormatProvider provider)
 {
     NumberFormatInfo.ValidateParseStyleInteger(style);
     if (s == null)
     {
         ThrowHelper.ThrowArgumentNullException(ExceptionArgument.s);
     }
     return(Number.ParseUInt32(s.AsReadOnlySpan(), style, NumberFormatInfo.GetInstance(provider)));
 }
예제 #5
0
        public static ushort Parse(String s, NumberStyles style)
        {
            NumberFormatInfo.ValidateParseStyle(style);
            uint i = Number.ParseUInt32(s, style);

            if (i > MaxValue)
            {
                throw new OverflowException("Overflow_UInt16");
            }
            return((ushort)i);
        }
예제 #6
0
 public unsafe static UIntPtr Parse(String s, NumberStyles style)
 {
     NumberFormatInfo.ValidateParseStyle(style);
     if (sizeof(UIntPtr) == 4)
     {
         return(Number.ParseUInt32(s, style));
     }
     else
     {
         return(Number.ParseUInt64(s, style));
     }
 }
예제 #7
0
        public static ushort Parse(String s, NumberStyles style, IFormatProvider provider)
        {
            NumberFormatInfo info = NumberFormatInfo.GetInstance(provider);

            NumberFormatInfo.ValidateParseStyle(style);
            uint i = Number.ParseUInt32(s, style, info);

            if (i > MaxValue)
            {
                throw new OverflowException(Environment.GetResourceString("Overflow_UInt16"));
            }
            return((ushort)i);
        }
예제 #8
0
        private static ushort Parse(String s, NumberStyles style, NumberFormatInfo info)
        {
            uint i = 0;

            try {
                i = Number.ParseUInt32(s, style, info);
            }
            catch (OverflowException e) {
                throw new OverflowException(Environment.GetResourceString("Overflow_UInt16"), e);
            }

            if (i > MaxValue)
            {
                throw new OverflowException(Environment.GetResourceString("Overflow_UInt16"));
            }
            return((ushort)i);
        }
예제 #9
0
        // Token: 0x060014EF RID: 5359 RVA: 0x0003DECC File Offset: 0x0003C0CC
        private static ushort Parse(string s, NumberStyles style, NumberFormatInfo info)
        {
            uint num = 0U;

            try
            {
                num = Number.ParseUInt32(s, style, info);
            }
            catch (OverflowException innerException)
            {
                throw new OverflowException(Environment.GetResourceString("Overflow_UInt16"), innerException);
            }
            if (num > 65535U)
            {
                throw new OverflowException(Environment.GetResourceString("Overflow_UInt16"));
            }
            return((ushort)num);
        }
예제 #10
0
        private static ushort Parse(string s, NumberStyles style, NumberFormatInfo info)
        {
            uint uint32;

            try
            {
                uint32 = Number.ParseUInt32(s, style, info);
            }
            catch (OverflowException ex)
            {
                throw new OverflowException(Environment.GetResourceString("Overflow_UInt16"), (Exception)ex);
            }
            if (uint32 > (uint)ushort.MaxValue)
            {
                throw new OverflowException(Environment.GetResourceString("Overflow_UInt16"));
            }
            return((ushort)uint32);
        }
예제 #11
0
파일: UInt16.cs 프로젝트: wecing/coreclr
        private static ushort Parse(ReadOnlySpan <char> s, NumberStyles style, NumberFormatInfo info)
        {
            uint i = 0;

            try
            {
                i = Number.ParseUInt32(s, style, info);
            }
            catch (OverflowException e)
            {
                throw new OverflowException(SR.Overflow_UInt16, e);
            }

            if (i > MaxValue)
            {
                throw new OverflowException(SR.Overflow_UInt16);
            }
            return((ushort)i);
        }
예제 #12
0
 public static uint Parse(String s, NumberStyles style)
 {
     NumberFormatInfo.ValidateParseStyleInteger(style);
     return(Number.ParseUInt32(s, style, NumberFormatInfo.CurrentInfo));
 }
예제 #13
0
 public static uint Parse(String s)
 {
     return(Number.ParseUInt32(s, NumberStyles.Integer, NumberFormatInfo.CurrentInfo));
 }
예제 #14
0
 public static uint Parse(ReadOnlySpan <char> s, NumberStyles style = NumberStyles.Integer, IFormatProvider?provider = null)
 {
     NumberFormatInfo.ValidateParseStyleInteger(style);
     return(Number.ParseUInt32(s, style, NumberFormatInfo.GetInstance(provider)));
 }
예제 #15
0
 public static uint Parse(String s, IFormatProvider provider)
 {
     return(Number.ParseUInt32(s, NumberStyles.Integer, NumberFormatInfo.GetInstance(provider)));
 }
예제 #16
0
 public static uint Parse(String s, NumberStyles style, IFormatProvider provider)
 {
     NumberFormatInfo.ValidateParseStyleInteger(style);
     return(Number.ParseUInt32(s, style, NumberFormatInfo.GetInstance(provider)));
 }
예제 #17
0
 public static UIntPtr Parse(String s, NumberStyles style)
 {
     NumberFormatInfo.ValidateParseStyle(style);
     return(Number.ParseUInt32(s, style));
 }