BigInteger.Implicit 操作员  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
定义 BigInteger 对象与其他类型之间的隐式转换。
重载
| Implicit(UInt16 to BigInteger) | 
						 定义从 16 位无符号整数到 BigInteger 值的隐式转换。 此 API 不兼容 CLS。 符合的替代方法是 Implicit(Int32 to BigInteger)。  | 
        	
| Implicit(UInt32 to BigInteger) | 
						 定义从 32 位无符号整数到 BigInteger 值的隐式转换。 此 API 不兼容 CLS。 符合的替代方法是 Implicit(Int64 to BigInteger)。  | 
        	
| Implicit(UInt128 to BigInteger) | 
						 将值隐式转换为 UInt128 大整数。  | 
        	
| Implicit(UIntPtr to BigInteger) | 
						 将值隐式转换为 UIntPtr 大整数。  | 
        	
| Implicit(UInt64 to BigInteger) | 
						 定义从 64 位无符号整数到 BigInteger 值的隐式转换。 此 API 不兼容 CLS。 符合的替代方法是 Double。  | 
        	
| Implicit(SByte to BigInteger) | 
						 定义从 8 位带符号整数到 BigInteger 值的隐式转换。 此 API 不兼容 CLS。 符合的替代方法是 BigInteger(Int32)。  | 
        	
| Implicit(Int128 to BigInteger) | 
						 将值隐式转换为 Int128 大整数。  | 
        	
| Implicit(Int64 to BigInteger) | 
						 定义从 64 位带符号整数到 BigInteger 值的隐式转换。  | 
        	
| Implicit(Int32 to BigInteger) | 
						 定义从 32 位带符号整数到 BigInteger 值的隐式转换。  | 
        	
| Implicit(Int16 to BigInteger) | 
						 定义从 16 位带符号整数到 BigInteger 值的隐式转换。  | 
        	
| Implicit(IntPtr to BigInteger) | 
						 将值隐式转换为 IntPtr 大整数。  | 
        	
| Implicit(Char to BigInteger) | 
						 将值隐式转换为 Char 大整数。  | 
        	
| Implicit(Byte to BigInteger) | 
						 定义从无符号字节到 BigInteger 值的隐式转换。  | 
        	
Implicit(UInt16 to BigInteger)
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
定义从 16 位无符号整数到 BigInteger 值的隐式转换。
此 API 不兼容 CLS。 符合的替代方法是 Implicit(Int32 to BigInteger)。
public:
 static operator System::Numerics::BigInteger(System::UInt16 value);
	[System.CLSCompliant(false)]
public static implicit operator System.Numerics.BigInteger(ushort value);
	[<System.CLSCompliant(false)>]
static member op_Implicit : uint16 -> System.Numerics.BigInteger
	Public Shared Widening Operator CType (value As UShort) As BigInteger
	参数
- value
 - UInt16
 
要转换为 BigInteger 的值。
返回
包含 value 参数值的对象。
- 属性
 
注解
对于不支持隐式运算符的语言,替代方法是 BigInteger.BigInteger(UInt32)。
方法的 Implicit(Byte to BigInteger) 重载定义了编译器可以自动将值转换为 BigInteger 的类型,而无需在 C#) 中 (显式强制转换运算符或调用 Visual Basic) 中 (转换函数。 它们正在扩大不涉及数据丢失且不引发 的 OverflowException转换。 此重载允许编译器处理从 UInt16 值到 BigInteger 值的转换,如以下示例所示。
ushort uShortValue = 25064;
BigInteger number = uShortValue;
number += uShortValue;
Console.WriteLine(number < uShortValue);           // Displays False
let uShortValue = 25064us
let number = BigInteger(uShortValue)
let mutable number = BigInteger.Add(number, uShortValue)
printfn $"{number < uShortValue}" // Displays False
Dim uShortValue As UShort = 25064
Dim number As BigInteger = uShortValue
number += uShortValue
Console.WriteLine(number < uShortValue)           ' Displays False
  适用于
Implicit(UInt32 to BigInteger)
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
定义从 32 位无符号整数到 BigInteger 值的隐式转换。
此 API 不兼容 CLS。 符合的替代方法是 Implicit(Int64 to BigInteger)。
public:
 static operator System::Numerics::BigInteger(System::UInt32 value);
	[System.CLSCompliant(false)]
public static implicit operator System.Numerics.BigInteger(uint value);
	[<System.CLSCompliant(false)>]
static member op_Implicit : uint32 -> System.Numerics.BigInteger
	Public Shared Widening Operator CType (value As UInteger) As BigInteger
	参数
- value
 - UInt32
 
要转换为 BigInteger 的值。
返回
包含 value 参数值的对象。
- 属性
 
注解
对于不支持隐式运算符的语言,替代方法是 BigInteger.BigInteger(UInt32)。
方法的 Implicit(Byte to BigInteger) 重载定义了编译器可以自动将值转换为 BigInteger 的类型,而无需在 C#) 中 (显式强制转换运算符或调用 Visual Basic) 中 (转换函数。 它们正在扩大不涉及数据丢失且不引发 的 OverflowException转换。 此重载允许编译器处理从 UInt32 值到 BigInteger 值的转换,如以下示例所示。
uint uIntValue = 65000;
BigInteger number = uIntValue;
number = BigInteger.Multiply(number, uIntValue);
Console.WriteLine(number == uIntValue);           // Displays False
let uIntValue = 65000u
let number = BigInteger(uIntValue)
let mutable number = BigInteger.Multiply(number, uIntValue)
printfn $"{number = uIntValue}" // Displays "False
Dim uIntegerValue As UInteger = 65000
Dim number As BigInteger = uIntegerValue
number = BigInteger.Multiply(number, uIntegerValue)
Console.WriteLine(number = uIntegerValue)           ' Displays False
  适用于
Implicit(UInt128 to BigInteger)
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
重要
此 API 不符合 CLS。
将值隐式转换为 UInt128 大整数。
public:
 static operator System::Numerics::BigInteger(UInt128 value);
	[System.CLSCompliant(false)]
public static implicit operator System.Numerics.BigInteger(UInt128 value);
	[<System.CLSCompliant(false)>]
static member op_Implicit : UInt128 -> System.Numerics.BigInteger
	Public Shared Widening Operator CType (value As UInt128) As BigInteger
	参数
- value
 - UInt128
 
要转换的值。
返回
              value 转换为大整数。
- 属性
 
适用于
Implicit(UIntPtr to BigInteger)
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
重要
此 API 不符合 CLS。
将值隐式转换为 UIntPtr 大整数。
public:
 static operator System::Numerics::BigInteger(UIntPtr value);
	[System.CLSCompliant(false)]
public static implicit operator System.Numerics.BigInteger(UIntPtr value);
	[<System.CLSCompliant(false)>]
static member op_Implicit : unativeint -> System.Numerics.BigInteger
	Public Shared Widening Operator CType (value As UIntPtr) As BigInteger
	参数
- value
 - 
				
				UIntPtr
unativeint
 
要转换的值。
返回
              value 转换为大整数。
- 属性
 
适用于
Implicit(UInt64 to BigInteger)
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
定义从 64 位无符号整数到 BigInteger 值的隐式转换。
此 API 不兼容 CLS。 符合的替代方法是 Double。
public:
 static operator System::Numerics::BigInteger(System::UInt64 value);
	[System.CLSCompliant(false)]
public static implicit operator System.Numerics.BigInteger(ulong value);
	[<System.CLSCompliant(false)>]
static member op_Implicit : uint64 -> System.Numerics.BigInteger
	Public Shared Widening Operator CType (value As ULong) As BigInteger
	参数
- value
 - UInt64
 
要转换为 BigInteger 的值。
返回
包含 value 参数值的对象。
- 属性
 
注解
对于不支持隐式运算符的语言,替代方法是 BigInteger.BigInteger(UInt64)。
方法的 Implicit(Byte to BigInteger) 重载定义了编译器可以自动将值转换为 BigInteger 的类型,而无需在 C#) 中 (显式强制转换运算符或调用 Visual Basic) 中 (转换函数。 它们正在扩大不涉及数据丢失且不引发 的 OverflowException转换。 此重载允许编译器处理从 UInt64 值到 BigInteger 值的转换,如以下示例所示。
ulong uLongValue = 1358754982;
BigInteger number = uLongValue;
number = number * 2 - uLongValue;
Console.WriteLine(number * uLongValue / uLongValue); // Displays 1358754982
let uLongValue = 1358754982UL
let number = BigInteger(uLongValue)
let mutable number = BigInteger.Add(number, uLongValue / 2UL |> bigint)
printfn $"{number * bigint uLongValue / bigint uLongValue}" // Displays 1358754982
Dim uLongValue As ULong = 1358754982
Dim number As BigInteger = uLongValue
number = number * 2 - uLongValue
Console.WriteLine(number * uLongValue / uLongValue)  ' Displays 1358754982
  适用于
Implicit(SByte to BigInteger)
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
定义从 8 位带符号整数到 BigInteger 值的隐式转换。
此 API 不兼容 CLS。 符合的替代方法是 BigInteger(Int32)。
public:
 static operator System::Numerics::BigInteger(System::SByte value);
	[System.CLSCompliant(false)]
public static implicit operator System.Numerics.BigInteger(sbyte value);
	[<System.CLSCompliant(false)>]
static member op_Implicit : sbyte -> System.Numerics.BigInteger
	Public Shared Widening Operator CType (value As SByte) As BigInteger
	参数
- value
 - SByte
 
要转换为 BigInteger 的值。
返回
包含 value 参数值的对象。
- 属性
 
注解
对于不支持隐式运算符的语言,替代方法是 BigInteger.BigInteger(Int32)。
方法的 Implicit(Byte to BigInteger) 重载定义了编译器可以自动将值转换为 BigInteger 的类型,而无需在 C#) 中 (显式强制转换运算符或调用 Visual Basic) 中 (转换函数。 它们正在扩大不涉及数据丢失且不引发 的 OverflowException转换。 此重载允许编译器处理从 SByte 值到 BigInteger 值的转换,如以下示例所示。
sbyte sByteValue = -12;
BigInteger number = BigInteger.Pow(sByteValue, 3);
Console.WriteLine(number < sByteValue);            // Displays True
let sByteValue = -12y
let number = BigInteger.Pow(sByteValue, 3)
printfn $"{number < sByteValue}" // Displays True
Dim sByteValue As SByte = -12
Dim number As BigInteger = BigInteger.Pow(sByteValue, 3)
Console.WriteLine(number < sByteValue)  ' Displays True
  适用于
Implicit(Int128 to BigInteger)
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
将值隐式转换为 Int128 大整数。
public:
 static operator System::Numerics::BigInteger(Int128 value);
	public static implicit operator System.Numerics.BigInteger(Int128 value);
	static member op_Implicit : Int128 -> System.Numerics.BigInteger
	Public Shared Widening Operator CType (value As Int128) As BigInteger
	参数
- value
 - Int128
 
要转换的值。
返回
              value 转换为大整数。
适用于
Implicit(Int64 to BigInteger)
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
定义从 64 位带符号整数到 BigInteger 值的隐式转换。
public:
 static operator System::Numerics::BigInteger(long value);
	public static implicit operator System.Numerics.BigInteger(long value);
	static member op_Implicit : int64 -> System.Numerics.BigInteger
	Public Shared Widening Operator CType (value As Long) As BigInteger
	参数
- value
 - Int64
 
要转换为 BigInteger 的值。
返回
包含 value 参数值的对象。
注解
对于不支持隐式运算符的语言,替代方法是 BigInteger.BigInteger(Int64)。
方法的 Implicit(Byte to BigInteger) 重载定义了编译器可以自动将值转换为 BigInteger 的类型,而无需在 C#) 中 (显式强制转换运算符或调用 Visual Basic) 中 (转换函数。 它们正在扩大不涉及数据丢失且不引发 的 OverflowException转换。 此重载允许编译器处理从 Int64 值到 BigInteger 值的转换,如以下示例所示。
long longValue = 1358754982;
BigInteger number = longValue;
number = number + (longValue / 2);
Console.WriteLine(number * longValue / longValue); // Displays 2038132473
let longValue = 1358754982L
let number = BigInteger longValue
let mutable number = BigInteger.Add(number, longValue / 2L |> bigint)
printfn $"{((number * bigint longValue) / (bigint longValue))}" // Displays 2038132473
Dim longValue As Long = 1358754982
Dim number As BigInteger = longValue
number = number + (longValue \ 2)
Console.WriteLine(number * longValue / longValue)  ' Displays 2038132473
  适用于
Implicit(Int32 to BigInteger)
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
定义从 32 位带符号整数到 BigInteger 值的隐式转换。
public:
 static operator System::Numerics::BigInteger(int value);
	public static implicit operator System.Numerics.BigInteger(int value);
	static member op_Implicit : int -> System.Numerics.BigInteger
	Public Shared Widening Operator CType (value As Integer) As BigInteger
	参数
- value
 - Int32
 
要转换为 BigInteger 的值。
返回
包含 value 参数值的对象。
注解
对于不支持隐式运算符的语言,替代方法是 BigInteger.BigInteger(Int32)。
方法的 Implicit(Byte to BigInteger) 重载定义类型,编译器可以在没有显式强制转换运算符 (C#) 或调用 Visual Basic) 中 (转换函数的情况下自动将值转换为 BigInteger 的类型。 它们正在扩大不涉及数据丢失且不引发 的 OverflowException转换。 此重载允许编译器处理从 Int32 值到 BigInteger 值的转换,如以下示例所示。
int intValue = 65000;
BigInteger number = intValue;
number = BigInteger.Multiply(number, intValue);
Console.WriteLine(number == intValue);            // Displays False
let intValue = 65000
let number = BigInteger(intValue)
let mutable number = BigInteger.Multiply(number, intValue)
printfn $"{number = intValue}" // Displays False
Dim integerValue As Integer = 65000
Dim number As BigInteger = integerValue
number = BigInteger.Multiply(number, integerValue)
Console.WriteLine(number = integerValue)           ' Displays False
  适用于
Implicit(Int16 to BigInteger)
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
定义从 16 位带符号整数到 BigInteger 值的隐式转换。
public:
 static operator System::Numerics::BigInteger(short value);
	public static implicit operator System.Numerics.BigInteger(short value);
	static member op_Implicit : int16 -> System.Numerics.BigInteger
	Public Shared Widening Operator CType (value As Short) As BigInteger
	参数
- value
 - Int16
 
要转换为 BigInteger 的值。
返回
包含 value 参数值的对象。
注解
对于不支持隐式运算符的语言,替代方法是 BigInteger.BigInteger(Int32)。
方法的 Implicit(Byte to BigInteger) 重载定义类型,编译器可以在没有显式强制转换运算符 (C#) 或调用 Visual Basic) 中 (转换函数的情况下自动将值转换为 BigInteger 的类型。 它们正在扩大不涉及数据丢失且不引发 的 OverflowException转换。 此重载允许编译器处理从 Int16 值到 BigInteger 值的转换,如以下示例所示。
short shortValue = 25064;
BigInteger number = shortValue;
number += shortValue;
Console.WriteLine(number < shortValue);           // Displays False
let shortValue = 25064s
let number = BigInteger(shortValue)
let mutable number = BigInteger.Add(number, shortValue)
printfn $"{number > shortValue}" // Displays False
Dim shortValue As Short = 25064
Dim number As BigInteger = shortValue
number += shortValue
Console.WriteLine(number < shortValue)           ' Displays False
  适用于
Implicit(IntPtr to BigInteger)
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
将值隐式转换为 IntPtr 大整数。
public:
 static operator System::Numerics::BigInteger(IntPtr value);
	public static implicit operator System.Numerics.BigInteger(IntPtr value);
	static member op_Implicit : nativeint -> System.Numerics.BigInteger
	Public Shared Widening Operator CType (value As IntPtr) As BigInteger
	参数
- value
 - 
				
				IntPtr
nativeint
 
要转换的值。
返回
              value 转换为大整数。
适用于
Implicit(Char to BigInteger)
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
将值隐式转换为 Char 大整数。
public:
 static operator System::Numerics::BigInteger(char value);
	public static implicit operator System.Numerics.BigInteger(char value);
	static member op_Implicit : char -> System.Numerics.BigInteger
	Public Shared Widening Operator CType (value As Char) As BigInteger
	参数
- value
 - Char
 
要转换的值。
返回
              value 转换为大整数。
适用于
Implicit(Byte to BigInteger)
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
- Source:
 - BigInteger.cs
 
定义从无符号字节到 BigInteger 值的隐式转换。
public:
 static operator System::Numerics::BigInteger(System::Byte value);
	public static implicit operator System.Numerics.BigInteger(byte value);
	static member op_Implicit : byte -> System.Numerics.BigInteger
	Public Shared Widening Operator CType (value As Byte) As BigInteger
	参数
- value
 - Byte
 
要转换为 BigInteger 的值。
返回
包含 value 参数值的对象。
注解
参数的任何小数部分 value 在转换前将被截断。
对于不支持隐式运算符的语言,替代方法是 BigInteger.BigInteger(Int32)。
方法的 Implicit(Byte to BigInteger) 重载定义类型,编译器可以在没有显式强制转换运算符 (C#) 或调用 Visual Basic) 中 (转换函数的情况下自动将值转换为 BigInteger 的类型。 它们正在扩大不涉及数据丢失且不引发 的 OverflowException转换。 此重载允许编译器处理从 Byte 值到 BigInteger 值的转换,如以下示例所示。
byte byteValue = 254;
BigInteger number = byteValue;
number = BigInteger.Add(number, byteValue);
Console.WriteLine(number > byteValue);            // Displays True
let byteValue = 254uy
let number = BigInteger(byteValue)
let mutable number = BigInteger.Add(number, byteValue)
printfn $"{number > byteValue}" // Displays True
Dim byteValue As Byte = 254
Dim number As BigInteger = byteValue
number = BigInteger.Add(number, byteValue)
Console.WriteLine(number > byteValue)           ' Displays True