当前位置: 首页>>代码示例>>C#>>正文


C# Convert.ToUInt64方法代码示例

本文整理汇总了C#中System.Convert.ToUInt64方法的典型用法代码示例。如果您正苦于以下问题:C# Convert.ToUInt64方法的具体用法?C# Convert.ToUInt64怎么用?C# Convert.ToUInt64使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Convert的用法示例。


在下文中一共展示了Convert.ToUInt64方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: foreach

string[] values = { "One", "1.34e28", "-26.87", "-18", "-6.00",
                    " 0", "137", "1601.9", Int32.MaxValue.ToString() };
ulong result;

foreach (string value in values)
{
   try {
      result = Convert.ToUInt64(value);
      Console.WriteLine("Converted the {0} value '{1}' to the {2} value {3}.",
                        value.GetType().Name, value, result.GetType().Name, result);
   }
   catch (OverflowException) {
      Console.WriteLine("{0} is outside the range of the UInt64 type.", value);
   }   
   catch (FormatException) {
      Console.WriteLine("The {0} value '{1}' is not in a recognizable format.",
                        value.GetType().Name, value);
   }   
}
开发者ID:.NET开发者,项目名称:System,代码行数:19,代码来源:Convert.ToUInt64

输出:

The String value 'One' is not in a recognizable format.
The String value '1.34e28' is not in a recognizable format.
The String value '-26.87' is not in a recognizable format.
-18 is outside the range of the UInt64 type.
The String value '-6.00' is not in a recognizable format.
Converted the String value ' 0' to the UInt64 value 0.
Converted the String value '137' to the UInt64 value 137.
The String value '1601.9' is not in a recognizable format.
Converted the String value '2147483647' to the UInt64 value 2147483647.

示例2: foreach

ushort[] numbers = { UInt16.MinValue, 121, 340, UInt16.MaxValue };
ulong result;

foreach (ushort number in numbers)
{
   try {
      result = Convert.ToUInt64(number);
      Console.WriteLine("Converted the {0} value {1} to the {2} value {3}.",
                        number.GetType().Name, number,
                        result.GetType().Name, result);
   }
   catch (OverflowException) {
      Console.WriteLine("The {0} value {1} is outside the range of the UInt64 type.",
                        number.GetType().Name, number);
   }
}
开发者ID:.NET开发者,项目名称:System,代码行数:16,代码来源:Convert.ToUInt64

输出:

Converted the UInt16 value 0 to the UInt64 value 0.
Converted the UInt16 value 121 to the UInt64 value 121.
Converted the UInt16 value 340 to the UInt64 value 340.
Converted the UInt16 value 65535 to the UInt64 value 65535.

示例3: foreach

uint[] numbers = { UInt32.MinValue, 121, 340, UInt32.MaxValue };
ulong result;

foreach (uint number in numbers)
{
   try {
      result = Convert.ToUInt64(number);
      Console.WriteLine("Converted the {0} value {1} to the {2} value {3}.",
                        number.GetType().Name, number,
                        result.GetType().Name, result);
   }
   catch (OverflowException) {
      Console.WriteLine("The {0} value {1} is outside the range of the UInt64 type.",
                        number.GetType().Name, number);
   }
}
开发者ID:.NET开发者,项目名称:System,代码行数:16,代码来源:Convert.ToUInt64

输出:

Converted the UInt32 value 0 to the UInt64 value 0.
Converted the UInt32 value 121 to the UInt64 value 121.
Converted the UInt32 value 340 to the UInt64 value 340.
Converted the UInt32 value 4294967295 to the UInt64 value 4294967295.

示例4: Main

//引入命名空间
using System;

public class Example
{
   public static void Main()
   {
      string[] hexStrings = { "8000000000000000", "0FFFFFFFFFFFFFFF",
                              "F000000000000000", "00A3000000000000",
                              "D", "-13", "9AC61", "GAD",
                              "FFFFFFFFFFFFFFFFF" };
      
      foreach (string hexString in hexStrings)
      {
         Console.Write("{0,-18}  -->  ", hexString);
         try {
            ulong number = Convert.ToUInt64(hexString, 16);
            Console.WriteLine("{0,26:N0}", number);
         }   
         catch (FormatException) {
            Console.WriteLine("{0,26}", "Bad Format");
         }   
         catch (OverflowException) {
            Console.WriteLine("{0,26}", "Numeric Overflow");
         }   
         catch (ArgumentException) {
            Console.WriteLine("{0,26}", "Invalid in Base 16");
         }
      }                                            
   }
}
开发者ID:.NET开发者,项目名称:System,代码行数:31,代码来源:Convert.ToUInt64

输出:

8000000000000000    -->   9,223,372,036,854,775,808
0FFFFFFFFFFFFFFF    -->   1,152,921,504,606,846,975
F000000000000000    -->  17,293,822,569,102,704,640
00A3000000000000    -->      45,880,421,203,836,928
D                   -->                          13
-13                 -->          Invalid in Base 16
9AC61               -->                     633,953
GAD                 -->                  Bad Format
FFFFFFFFFFFFFFFFF   -->            Numeric Overflow

示例5:

// Create a hexadecimal value out of range of the UInt64 type.
string value = Convert.ToString(Int64.MinValue, 16);
// Convert it back to a number.
try
{
   UInt64 number = Convert.ToUInt64(value, 16);
   Console.WriteLine("0x{0} converts to {1}.", value, number);
}   
catch (OverflowException)
{
   Console.WriteLine("Unable to convert '0x{0}' to an unsigned long integer.", 
                     value);
}
开发者ID:.NET开发者,项目名称:System,代码行数:13,代码来源:Convert.ToUInt64

示例6: if

// Create a negative hexadecimal value out of range of the UInt64 type.
long sourceNumber = Int64.MinValue;
bool isSigned = Math.Sign((long)sourceNumber.GetType().GetField("MinValue").GetValue(null)) == -1;
string value = Convert.ToString(sourceNumber, 16);
UInt64 targetNumber;
try
{
   targetNumber = Convert.ToUInt64(value, 16);
   if (isSigned && ((targetNumber & 0x8000000000000000) != 0))
      throw new OverflowException();
   else 
      Console.WriteLine("0x{0} converts to {1}.", value, targetNumber);
}
catch (OverflowException)
{
   Console.WriteLine("Unable to convert '0x{0}' to an unsigned long integer.", 
                     value);
} 
// Displays the following to the console:
//    Unable to convert '0x8000000000000000' to an unsigned long integer.
开发者ID:.NET开发者,项目名称:System,代码行数:20,代码来源:Convert.ToUInt64

示例7: if

//引入命名空间
using System;
using System.Globalization;
using System.Text.RegularExpressions;

public enum SignBit { Negative=-1, Zero=0, Positive=1 };

public struct HexString : IConvertible
{
   private SignBit signBit;
   private string hexString;
   
   public SignBit Sign
   {
      set { signBit = value; }
      get { return signBit; }
   }
   
   public string Value
   {
      set 
      { 
         if (value.Trim().Length > 16)
            throw new ArgumentException("The hexadecimal representation of a 64-bit integer cannot have more than 16 characters.");
         else if (! Regex.IsMatch(value, "([0-9,A-F]){1,8}", RegexOptions.IgnoreCase))
            throw new ArgumentException("The hexadecimal representation of a 64-bit integer contains invalid characters.");             
         else
            hexString = value;
      } 
      get { return hexString; }
   }
   
   // IConvertible implementations.
   public TypeCode GetTypeCode() 
   {
      return TypeCode.Object;
   }
   
   public bool ToBoolean(IFormatProvider provider)
   {
      return signBit != SignBit.Zero;
   } 
   
   public byte ToByte(IFormatProvider provider)
   {
      if (signBit == SignBit.Negative)
         throw new OverflowException(String.Format("{0} is out of range of the Byte type.", Convert.ToInt64(hexString, 16))); 
      else
         try {
            return Byte.Parse(hexString, NumberStyles.HexNumber);
         }   
         catch (OverflowException e) {
            throw new OverflowException(String.Format("{0} is out of range of the Byte type.", Convert.ToUInt64(hexString, 16)), e);
         }   
   }
   
   public char ToChar(IFormatProvider provider)
   {
      if (signBit == SignBit.Negative) 
         throw new OverflowException(String.Format("{0} is out of range of the Char type.", Convert.ToInt64(hexString, 16)));
      
      try {
         ushort codePoint = UInt16.Parse(this.hexString, NumberStyles.HexNumber);
         return Convert.ToChar(codePoint);
      }   
      catch (OverflowException) {
         throw new OverflowException(String.Format("{0} is out of range of the Char type.", Convert.ToUInt64(hexString, 16)));
      }      
   } 
   
   public DateTime ToDateTime(IFormatProvider provider)
   {
      throw new InvalidCastException("Hexadecimal to DateTime conversion is not supported.");
   }
   
   public decimal ToDecimal(IFormatProvider provider)
   {
      if (signBit == SignBit.Negative)
      {
         long hexValue = Int64.Parse(hexString, NumberStyles.HexNumber);
         return Convert.ToDecimal(hexValue);
      }   
      else
      {
         ulong hexValue = UInt64.Parse(hexString, NumberStyles.HexNumber);
         return Convert.ToDecimal(hexValue);
      }
   }
   
   public double ToDouble(IFormatProvider provider) 
   {
      if (signBit == SignBit.Negative)
         return Convert.ToDouble(Int64.Parse(hexString, NumberStyles.HexNumber));
      else
         return Convert.ToDouble(UInt64.Parse(hexString, NumberStyles.HexNumber));
   }   
   
   public short ToInt16(IFormatProvider provider) 
   {
      if (signBit == SignBit.Negative)
         try {
            return Convert.ToInt16(Int64.Parse(hexString, NumberStyles.HexNumber));
         }   
         catch (OverflowException e) { 
            throw new OverflowException(String.Format("{0} is out of range of the Int16 type.", Convert.ToInt64(hexString, 16)), e);
         }
      else
         try {
            return Convert.ToInt16(UInt64.Parse(hexString, NumberStyles.HexNumber));
         }
         catch (OverflowException e) {
            throw new OverflowException(String.Format("{0} is out of range of the Int16 type.", Convert.ToUInt64(hexString, 16)), e);
         }
   }
   
   public int ToInt32(IFormatProvider provider)
   {
      if (signBit == SignBit.Negative)
         try {
            return Convert.ToInt32(Int64.Parse(hexString, NumberStyles.HexNumber));
         }
         catch (OverflowException e) {
            throw new OverflowException(String.Format("{0} is out of range of the Int32 type.", Convert.ToUInt64(hexString, 16)), e);
         }   
      else
         try {
            return Convert.ToInt32(UInt64.Parse(hexString, NumberStyles.HexNumber));
         }   
         catch (OverflowException e) {
            throw new OverflowException(String.Format("{0} is out of range of the Int32 type.", Convert.ToUInt64(hexString, 16)), e);
         }   
   }
   
   public long ToInt64(IFormatProvider provider) 
   {
      if (signBit == SignBit.Negative)
         return Int64.Parse(hexString, NumberStyles.HexNumber);
      else
         try {
            return Convert.ToInt64(UInt64.Parse(hexString, NumberStyles.HexNumber));
         }   
         catch (OverflowException e) {
            throw new OverflowException(String.Format("{0} is out of range of the Int64 type.", Convert.ToUInt64(hexString, 16)), e);
         }
   }
   
   public sbyte ToSByte(IFormatProvider provider) 
   {
      if (signBit == SignBit.Negative)
         try {
            return Convert.ToSByte(Int64.Parse(hexString, NumberStyles.HexNumber));
         }   
         catch (OverflowException e) {
            throw new OverflowException(String.Format("{0} is outside the range of the SByte type.", 
                                                      Int64.Parse(hexString, NumberStyles.HexNumber), e));
         }
      else
         try {
            return Convert.ToSByte(UInt64.Parse(hexString, NumberStyles.HexNumber));
         }   
         catch (OverflowException e) {
            throw new OverflowException(String.Format("{0} is outside the range of the SByte type.", 
                                                    UInt64.Parse(hexString, NumberStyles.HexNumber)), e);
         }   
   }

   public float ToSingle(IFormatProvider provider) 
   {
      if (signBit == SignBit.Negative)
         return Convert.ToSingle(Int64.Parse(hexString, NumberStyles.HexNumber));
      else
         return Convert.ToSingle(UInt64.Parse(hexString, NumberStyles.HexNumber));
   }

   public string ToString(IFormatProvider provider)
   {
      return "0x" + this.hexString;
   }
   
   public object ToType(Type conversionType, IFormatProvider provider)
   {
      switch (Type.GetTypeCode(conversionType))
      {
         case TypeCode.Boolean: 
            return this.ToBoolean(null);
         case TypeCode.Byte:
            return this.ToByte(null);
         case TypeCode.Char:
            return this.ToChar(null);
         case TypeCode.DateTime:
            return this.ToDateTime(null);
         case TypeCode.Decimal:
            return this.ToDecimal(null);
         case TypeCode.Double:
            return this.ToDouble(null);
         case TypeCode.Int16:
            return this.ToInt16(null);
         case TypeCode.Int32:
            return this.ToInt32(null);
         case TypeCode.Int64:
            return this.ToInt64(null);
         case TypeCode.Object:
            if (typeof(HexString).Equals(conversionType))
               return this;
            else
               throw new InvalidCastException(String.Format("Conversion to a {0} is not supported.", conversionType.Name));
         case TypeCode.SByte:
            return this.ToSByte(null);
         case TypeCode.Single:
            return this.ToSingle(null);
         case TypeCode.String:
            return this.ToString(null);
         case TypeCode.UInt16:
            return this.ToUInt16(null);
         case TypeCode.UInt32:
            return this.ToUInt32(null);
         case TypeCode.UInt64:
            return this.ToUInt64(null);   
         default:
            throw new InvalidCastException(String.Format("Conversion to {0} is not supported.", conversionType.Name));   
      }
   }
   
   public ushort ToUInt16(IFormatProvider provider) 
   {
      if (signBit == SignBit.Negative)
         throw new OverflowException(String.Format("{0} is outside the range of the UInt16 type.", 
                                                   Int64.Parse(hexString, NumberStyles.HexNumber)));
      else
         try {
            return Convert.ToUInt16(UInt64.Parse(hexString, NumberStyles.HexNumber));
         }
         catch (OverflowException e) {
            throw new OverflowException(String.Format("{0} is out of range of the UInt16 type.", Convert.ToUInt64(hexString, 16)), e);
         }            
   }

   public uint ToUInt32(IFormatProvider provider) 
   {
      if (signBit == SignBit.Negative)
         throw new OverflowException(String.Format("{0} is outside the range of the UInt32 type.", 
                                                   Int64.Parse(hexString, NumberStyles.HexNumber)));
      else
         try {
            return Convert.ToUInt32(UInt64.Parse(hexString, NumberStyles.HexNumber));
         }
         catch (OverflowException) {
            throw new OverflowException(String.Format("{0} is outside the range of the UInt32 type.", 
                                                      UInt64.Parse(hexString, NumberStyles.HexNumber)));
         }   
   }
   
   public ulong ToUInt64(IFormatProvider provider) 
   {
      if (signBit == SignBit.Negative)
         throw new OverflowException(String.Format("{0} is outside the range of the UInt64 type.", 
                                                   Int64.Parse(hexString, NumberStyles.HexNumber)));
      else
         return Convert.ToUInt64(hexString, 16);
   }
}
开发者ID:.NET开发者,项目名称:System,代码行数:261,代码来源:Convert.ToUInt64

示例8: Main

public class Example
{
   public static void Main()
   {
      ulong positiveValue = UInt64.MaxValue - 100000;
      long negativeValue = -1;

      HexString positiveString = new HexString();
      positiveString.Sign = (SignBit) Math.Sign((decimal)positiveValue);
      positiveString.Value = positiveValue.ToString("X");
      
      HexString negativeString = new HexString();
      negativeString.Sign = (SignBit) Math.Sign(negativeValue);
      negativeString.Value = negativeValue.ToString("X");
      
      try {
         Console.WriteLine("0x{0} converts to {1}.", positiveString.Value, Convert.ToUInt64(positiveString));
      }
      catch (OverflowException) {
         Console.WriteLine("{0} is outside the range of the UInt64 type.", 
                           Int64.Parse(positiveString.Value, NumberStyles.HexNumber));
      }                     

      try {
         Console.WriteLine("0x{0} converts to {1}.", negativeString.Value, Convert.ToUInt64(negativeString));
      }   
      catch (OverflowException) {
         Console.WriteLine("{0} is outside the range of the UInt64 type.", 
                           Int64.Parse(negativeString.Value, NumberStyles.HexNumber));
      }                           
   }
}
开发者ID:.NET开发者,项目名称:System,代码行数:32,代码来源:Convert.ToUInt64

输出:

0xFFFFFFFFFFFE795F converts to 18446744073709451615.
-1 is outside the range of the UInt64 type.

示例9: Main

//引入命名空间
using System;
using System.Globalization;

public class Example
{
   public static void Main()
   {
      // Create a NumberFormatInfo object and set several properties.
      NumberFormatInfo provider = new NumberFormatInfo();
      provider.PositiveSign = "pos ";
      provider.NegativeSign = "neg ";

      // Define an array of numeric strings.
      string[] values = { "123456789012", "+123456789012",
                          "pos 123456789012", "123456789012.",
                          "123,456,789,012", "18446744073709551615",
                          "18446744073709551616", "neg 1", "-1" };
      //  Convert the strings using the format provider.
      foreach (string value in values)
      {
         Console.Write("{0,-20}  -->  ", value);
         try {
            Console.WriteLine("{0,20}", Convert.ToUInt64(value, provider));
         }
         catch (FormatException) {
            Console.WriteLine("{0,20}", "Invalid Format");
         }   
         catch (OverflowException) {
            Console.WriteLine("{0,20}", "Numeric Overflow");
         }               
      }
   }
}
开发者ID:.NET开发者,项目名称:System,代码行数:34,代码来源:Convert.ToUInt64

输出:

123456789012          -->          123456789012
+123456789012         -->        Invalid Format
pos 123456789012      -->          123456789012
123456789012.         -->        Invalid Format
123,456,789,012       -->        Invalid Format
18446744073709551615  -->  18446744073709551615
18446744073709551616  -->      Numeric Overflow
neg 1                 -->      Numeric Overflow
-1                    -->        Invalid Format

示例10: foreach

float[] values= { Single.MinValue, -1.38e10f, -1023.299f, -12.98f,
                  0f, 9.113e-16f, 103.919f, 17834.191f, Single.MaxValue };
ulong result;

foreach (float value in values)
{
   try {
      result = Convert.ToUInt64(value);
      Console.WriteLine("Converted the {0} value {1} to the {2} value {3}.",
                        value.GetType().Name, value, result.GetType().Name, result);
   }
   catch (OverflowException) {
      Console.WriteLine("{0} is outside the range of the UInt64 type.", value);
   }   
}
开发者ID:.NET开发者,项目名称:System,代码行数:15,代码来源:Convert.ToUInt64

输出:

-3.402823E+38 is outside the range of the UInt64 type.
-1.38E+10 is outside the range of the UInt64 type.
-1023.299 is outside the range of the UInt64 type.
-12.98 is outside the range of the UInt64 type.
Converted the Single value 0 to the UInt64 value 0.
Converted the Single value 9.113E-16 to the UInt64 value 0.
Converted the Single value 103.919 to the UInt64 value 104.
Converted the Single value 17834.19 to the UInt64 value 17834.
3.402823E+38 is outside the range of the UInt64 type.

示例11: foreach

sbyte[] numbers = { SByte.MinValue, -1, 0, 10, SByte.MaxValue };
ulong result;

foreach (sbyte number in numbers)
{
   try {
      result = Convert.ToUInt64(number);
      Console.WriteLine("Converted the {0} value {1} to the {2} value {3}.",
                        number.GetType().Name, number,
                        result.GetType().Name, result);
   }
   catch (OverflowException) {
      Console.WriteLine("The {0} value {1} is outside the range of the UInt64 type.",
                        number.GetType().Name, number);
   }   
}
开发者ID:.NET开发者,项目名称:System,代码行数:16,代码来源:Convert.ToUInt64

输出:

The SByte value -128 is outside the range of the UInt64 type.
The SByte value -1 is outside the range of the UInt64 type.
Converted the SByte value 0 to the UInt64 value 0.
Converted the SByte value 10 to the UInt64 value 10.
Converted the SByte value 127 to the UInt64 value 127.

示例12: foreach

short[] numbers= { Int16.MinValue, -1, 0, 121, 340, Int16.MaxValue };
ulong result;

foreach (short number in numbers)
{
   try {
      result = Convert.ToUInt64(number);
      Console.WriteLine("Converted the {0} value {1} to a {2} value {3}.",
                           number.GetType().Name, number,
                           result.GetType().Name, result);
   }
   catch (OverflowException) {
      Console.WriteLine("{0} is outside the range of the UInt64 type.", number);
   }   
}
开发者ID:.NET开发者,项目名称:System,代码行数:15,代码来源:Convert.ToUInt64

输出:

-32768 is outside the range of the UInt64 type.
-1 is outside the range of the UInt64 type.
Converted the Int16 value 0 to a UInt64 value 0.
Converted the Int16 value 121 to a UInt64 value 121.
Converted the Int16 value 340 to a UInt64 value 340.
Converted the Int16 value 32767 to a UInt64 value 32767.

示例13: foreach

long[] numbers = { Int64.MinValue, -19432, -18, 0, 121, 340, Int64.MaxValue };
ulong result;
foreach (long number in numbers)
{
   try {
      result = Convert.ToUInt64(number);
      Console.WriteLine("Converted the {0} value {1} to the {2} value {3}.",
                        number.GetType().Name, number,
                        result.GetType().Name, result);
   }
   catch (OverflowException) {
      Console.WriteLine("The {0} value {1} is outside the range of the UInt64 type.",
                        number.GetType().Name, number);
   }
}
开发者ID:.NET开发者,项目名称:System,代码行数:15,代码来源:Convert.ToUInt64

输出:

The Int64 value -9223372036854775808 is outside the range of the UInt64 type.
The Int64 value -19432 is outside the range of the UInt64 type.
The Int64 value -18 is outside the range of the UInt64 type.
Converted the Int64 value 0 to the UInt64 value 0.
Converted the Int64 value 121 to the UInt64 value 121.
Converted the Int64 value 340 to the UInt64 value 340.
Converted the Int64 value 9223372036854775807 to a UInt64 value 9223372036854775807.

示例14: foreach

int[] numbers = { Int32.MinValue, -1, 0, 121, 340, Int32.MaxValue };
ulong result;

foreach (int number in numbers)
{
   try {
      result = Convert.ToUInt64(number);
      Console.WriteLine("Converted the {0} value {1} to the {2} value {3}.",
                        number.GetType().Name, number,
                        result.GetType().Name, result);
   } 
   catch (OverflowException) {
      Console.WriteLine("The {0} value {1} is outside the range of the UInt64 type.",
                        number.GetType().Name, number);
   }   
}
开发者ID:.NET开发者,项目名称:System,代码行数:16,代码来源:Convert.ToUInt64

输出:

The Int32 value -2147483648 is outside the range of the UInt64 type.
The Int32 value -1 is outside the range of the UInt64 type.
Converted the Int32 value 0 to the UInt64 value 0.
Converted the Int32 value 121 to the UInt64 value 121.
Converted the Int32 value 340 to the UInt64 value 340.
Converted the Int32 value 2147483647 to the UInt64 value 2147483647.

示例15: foreach

double[] values= { Double.MinValue, -1.38e10, -1023.299, -12.98,
                   0, 9.113e-16, 103.919, 17834.191, Double.MaxValue };
ulong result;

foreach (double value in values)
{
   try {
      result = Convert.ToUInt64(value);
      Console.WriteLine("Converted the {0} value '{1}' to the {2} value {3}.",
                        value.GetType().Name, value,
                        result.GetType().Name, result);
   }
   catch (OverflowException) {
      Console.WriteLine("{0} is outside the range of the UInt64 type.", value);
   }   
}
开发者ID:.NET开发者,项目名称:System,代码行数:16,代码来源:Convert.ToUInt64

输出:

-1.79769313486232E+308 is outside the range of the UInt64 type.
-13800000000 is outside the range of the UInt64 type.
-1023.299 is outside the range of the UInt64 type.
-12.98 is outside the range of the UInt64 type.
Converted the Double value '0' to the UInt64 value 0.
Converted the Double value '9.113E-16' to the UInt64 value 0.
Converted the Double value '103.919' to the UInt64 value 104.
Converted the Double value '17834.191' to the UInt64 value 17834.
1.79769313486232E+308 is outside the range of the UInt64 type.


注:本文中的System.Convert.ToUInt64方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。