संपादित करें

इसके माध्यम से साझा किया गया


BigInteger.Implicit Operator

Definition

Defines an implicit conversion between a BigInteger object and another type.

Overloads

Implicit(UInt16 to BigInteger)

Defines an implicit conversion of a 16-bit unsigned integer to a BigInteger value.

This API is not CLS-compliant. The compliant alternative is Implicit(Int32 to BigInteger).

Implicit(UInt32 to BigInteger)

Defines an implicit conversion of a 32-bit unsigned integer to a BigInteger value.

This API is not CLS-compliant. The compliant alternative is Implicit(Int64 to BigInteger).

Implicit(UInt128 to BigInteger)

Implicitly converts a UInt128 value to a big integer.

Implicit(UIntPtr to BigInteger)

Implicitly converts a UIntPtr value to a big integer.

Implicit(UInt64 to BigInteger)

Defines an implicit conversion of a 64-bit unsigned integer to a BigInteger value.

This API is not CLS-compliant. The compliant alternative is Double.

Implicit(SByte to BigInteger)

Defines an implicit conversion of an 8-bit signed integer to a BigInteger value.

This API is not CLS-compliant. The compliant alternative is BigInteger(Int32).

Implicit(Int128 to BigInteger)

Implicitly converts a Int128 value to a big integer.

Implicit(Int64 to BigInteger)

Defines an implicit conversion of a signed 64-bit integer to a BigInteger value.

Implicit(Int32 to BigInteger)

Defines an implicit conversion of a signed 32-bit integer to a BigInteger value.

Implicit(Int16 to BigInteger)

Defines an implicit conversion of a signed 16-bit integer to a BigInteger value.

Implicit(IntPtr to BigInteger)

Implicitly converts a IntPtr value to a big integer.

Implicit(Char to BigInteger)

Implicitly converts a Char value to a big integer.

Implicit(Byte to BigInteger)

Defines an implicit conversion of an unsigned byte to a BigInteger value.

Implicit(UInt16 to BigInteger)

Source:
BigInteger.cs
Source:
BigInteger.cs
Source:
BigInteger.cs

Important

This API is not CLS-compliant.

CLS-compliant alternative
System.Numerics.BigInteger.Implicit(Int32 to BigInteger)

Defines an implicit conversion of a 16-bit unsigned integer to a BigInteger value.

This API is not CLS-compliant. The compliant alternative is 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

Parameters

value
UInt16

The value to convert to a BigInteger.

Returns

An object that contains the value of the value parameter.

Attributes

Remarks

For languages that do not support implicit operators, the alternative method is BigInteger.BigInteger(UInt32).

The overloads of the Implicit(Byte to BigInteger) method define the types to which or from which a compiler can automatically convert a BigInteger value without an explicit casting operator (in C#) or a call to a conversion function (in Visual Basic). They are widening conversions that do not involve data loss and do not throw an OverflowException. This overload lets the compiler handle conversions from a UInt16 value to a BigInteger value, as the following example shows.

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

Applies to

Implicit(UInt32 to BigInteger)

Source:
BigInteger.cs
Source:
BigInteger.cs
Source:
BigInteger.cs

Important

This API is not CLS-compliant.

CLS-compliant alternative
System.Numerics.BigInteger.Implicit(Int64 to BigInteger)

Defines an implicit conversion of a 32-bit unsigned integer to a BigInteger value.

This API is not CLS-compliant. The compliant alternative is 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

Parameters

value
UInt32

The value to convert to a BigInteger.

Returns

An object that contains the value of the value parameter.

Attributes

Remarks

For languages that do not support implicit operators, the alternative method is BigInteger.BigInteger(UInt32).

The overloads of the Implicit(Byte to BigInteger) method define the types to which or from which a compiler can automatically convert a BigInteger value without an explicit casting operator (in C#) or a call to a conversion function (in Visual Basic). They are widening conversions that do not involve data loss and do not throw an OverflowException. This overload lets the compiler handle conversions from a UInt32 value to a BigInteger value, as the following example shows.

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

Applies to

Implicit(UInt128 to BigInteger)

Source:
BigInteger.cs
Source:
BigInteger.cs
Source:
BigInteger.cs

Important

This API is not CLS-compliant.

Implicitly converts a UInt128 value to a big integer.

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

Parameters

value
UInt128

The value to convert.

Returns

value converted to a big integer.

Attributes

Applies to

Implicit(UIntPtr to BigInteger)

Source:
BigInteger.cs
Source:
BigInteger.cs
Source:
BigInteger.cs

Important

This API is not CLS-compliant.

Implicitly converts a UIntPtr value to a big integer.

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

Parameters

value
UIntPtr

unativeint

The value to convert.

Returns

value converted to a big integer.

Attributes

Applies to

Implicit(UInt64 to BigInteger)

Source:
BigInteger.cs
Source:
BigInteger.cs
Source:
BigInteger.cs

Important

This API is not CLS-compliant.

CLS-compliant alternative
System.Double

Defines an implicit conversion of a 64-bit unsigned integer to a BigInteger value.

This API is not CLS-compliant. The compliant alternative is 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

Parameters

value
UInt64

The value to convert to a BigInteger.

Returns

An object that contains the value of the value parameter.

Attributes

Remarks

For languages that do not support implicit operators, the alternative method is BigInteger.BigInteger(UInt64).

The overloads of the Implicit(Byte to BigInteger) method define the types to which or from which a compiler can automatically convert a BigInteger value without an explicit casting operator (in C#) or a call to a conversion function (in Visual Basic). They are widening conversions that do not involve data loss and do not throw an OverflowException. This overload lets the compiler handle conversions from a UInt64 value to a BigInteger value, as the following example shows.

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

Applies to

Implicit(SByte to BigInteger)

Source:
BigInteger.cs
Source:
BigInteger.cs
Source:
BigInteger.cs

Important

This API is not CLS-compliant.

CLS-compliant alternative
System.Numerics.BigInteger.BigInteger(Int32)

Defines an implicit conversion of an 8-bit signed integer to a BigInteger value.

This API is not CLS-compliant. The compliant alternative is 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

Parameters

value
SByte

The value to convert to a BigInteger.

Returns

An object that contains the value of the value parameter.

Attributes

Remarks

For languages that do not support implicit operators, the alternative method is BigInteger.BigInteger(Int32).

The overloads of the Implicit(Byte to BigInteger) method define the types to which or from which a compiler can automatically convert a BigInteger value without an explicit casting operator (in C#) or a call to a conversion function (in Visual Basic). They are widening conversions that do not involve data loss and do not throw an OverflowException. This overload lets the compiler handle conversions from a SByte value to a BigInteger value, as the following example shows.

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

Applies to

Implicit(Int128 to BigInteger)

Source:
BigInteger.cs
Source:
BigInteger.cs
Source:
BigInteger.cs

Implicitly converts a Int128 value to a big integer.

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

Parameters

value
Int128

The value to convert.

Returns

value converted to a big integer.

Applies to

Implicit(Int64 to BigInteger)

Source:
BigInteger.cs
Source:
BigInteger.cs
Source:
BigInteger.cs

Defines an implicit conversion of a signed 64-bit integer to a BigInteger value.

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

Parameters

value
Int64

The value to convert to a BigInteger.

Returns

An object that contains the value of the value parameter.

Remarks

For languages that do not support implicit operators, the alternative method is BigInteger.BigInteger(Int64).

The overloads of the Implicit(Byte to BigInteger) method define the types to which or from which a compiler can automatically convert a BigInteger value without an explicit casting operator (in C#) or a call to a conversion function (in Visual Basic). They are widening conversions that do not involve data loss and do not throw an OverflowException. This overload lets the compiler handle conversions from a Int64 value to a BigInteger value, as the following example shows.

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

Applies to

Implicit(Int32 to BigInteger)

Source:
BigInteger.cs
Source:
BigInteger.cs
Source:
BigInteger.cs

Defines an implicit conversion of a signed 32-bit integer to a BigInteger value.

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

Parameters

value
Int32

The value to convert to a BigInteger.

Returns

An object that contains the value of the value parameter.

Remarks

For languages that do not support implicit operators, the alternative method is BigInteger.BigInteger(Int32).

The overloads of the Implicit(Byte to BigInteger) method define the types to which or from which a compiler can automatically convert a BigInteger value without an explicit casting operator (in C#) or a call to a conversion function (in Visual Basic). They are widening conversions that do not involve data loss and do not throw an OverflowException. This overload lets the compiler handle conversions from a Int32 value to a BigInteger value, as the following example shows.

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

Applies to

Implicit(Int16 to BigInteger)

Source:
BigInteger.cs
Source:
BigInteger.cs
Source:
BigInteger.cs

Defines an implicit conversion of a signed 16-bit integer to a BigInteger value.

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

Parameters

value
Int16

The value to convert to a BigInteger.

Returns

An object that contains the value of the value parameter.

Remarks

For languages that do not support implicit operators, the alternative method is BigInteger.BigInteger(Int32).

The overloads of the Implicit(Byte to BigInteger) method define the types to which or from which a compiler can automatically convert a BigInteger value without an explicit casting operator (in C#) or a call to a conversion function (in Visual Basic). They are widening conversions that do not involve data loss and do not throw an OverflowException. This overload lets the compiler handle conversions from a Int16 value to a BigInteger value, as the following example shows.

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

Applies to

Implicit(IntPtr to BigInteger)

Source:
BigInteger.cs
Source:
BigInteger.cs
Source:
BigInteger.cs

Implicitly converts a IntPtr value to a big integer.

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

Parameters

value
IntPtr

nativeint

The value to convert.

Returns

value converted to a big integer.

Applies to

Implicit(Char to BigInteger)

Source:
BigInteger.cs
Source:
BigInteger.cs
Source:
BigInteger.cs

Implicitly converts a Char value to a big integer.

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

Parameters

value
Char

The value to convert.

Returns

value converted to a big integer.

Applies to

Implicit(Byte to BigInteger)

Source:
BigInteger.cs
Source:
BigInteger.cs
Source:
BigInteger.cs

Defines an implicit conversion of an unsigned byte to a BigInteger value.

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

Parameters

value
Byte

The value to convert to a BigInteger.

Returns

An object that contains the value of the value parameter.

Remarks

Any fractional part of the value parameter is truncated before conversion.

For languages that do not support implicit operators, the alternative method is BigInteger.BigInteger(Int32).

The overloads of the Implicit(Byte to BigInteger) method define the types to which or from which a compiler can automatically convert a BigInteger value without an explicit casting operator (in C#) or a call to a conversion function (in Visual Basic). They are widening conversions that do not involve data loss and do not throw an OverflowException. This overload lets the compiler handle conversions from a Byte value to a BigInteger value, as the following example shows.

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

Applies to