Complex.ExplicitComplex.ExplicitComplex.ExplicitComplex.Explicit Operator

オーバーロード

 Explicit(Decimal to Complex) Explicit(Decimal to Complex) Explicit(Decimal to Complex) Explicit(Decimal to Complex) Decimal 値から複素数への明示的な型変換を定義します。Defines an explicit conversion of a Decimal value to a complex number. Explicit(BigInteger to Complex) Explicit(BigInteger to Complex) Explicit(BigInteger to Complex) Explicit(BigInteger to Complex) BigInteger 値から複素数への明示的な型変換を定義します。Defines an explicit conversion of a BigInteger value to a complex number.

Explicit(Decimal to Complex)Explicit(Decimal to Complex)Explicit(Decimal to Complex)Explicit(Decimal to Complex)

Decimal 値から複素数への明示的な型変換を定義します。Defines an explicit conversion of a Decimal value to a complex number.

``````public:
static explicit operator System::Numerics::Complex(System::Decimal value);``````
``public static explicit operator System.Numerics.Complex (decimal value);``
``static member op_Explicit : decimal -> System.Numerics.Complex``
``Public Shared Narrowing Operator CType (value As Decimal) As Complex``

パラメーター

value
Decimal Decimal Decimal Decimal

例

``````decimal[] numbers = { Decimal.MinValue, -18.35m, 0m, 1893.019m,
Decimal.MaxValue };
foreach (decimal number in numbers)
{
System.Numerics.Complex c1 = (System.Numerics.Complex) number;
Console.WriteLine("{0,30}  -->  {1}", number, c1);
}
// The example displays the following output:
//    -79228162514264337593543950335  -->  (-7.92281625142643E+28, 0)
//                            -18.35  -->  (-18.35, 0)
//                                 0  -->  (0, 0)
//                          1893.019  -->  (1893.019, 0)
//     79228162514264337593543950335  -->  (7.92281625142643E+28, 0)
``````
``````Dim numbers() As Decimal = { Decimal.MinValue, -18.35d, 0d, 1893.019d,
Decimal.MaxValue }
For Each number In numbers
Dim c1 As System.Numerics.Complex = CType(number,
System.Numerics.Complex)
Console.WriteLine("{0,30}  -->  {1}", number, c1)
Next
' The example displays the following output:
'    -79228162514264337593543950335  -->  (-7.92281625142643E+28, 0)
'                            -18.35  -->  (-18.3500003814697, 0)
'                                 0  -->  (0, 0)
'                          1893.019  -->  (1893.01904296875, 0)
'     79228162514264337593543950335  -->  (7.92281625142643E+28, 0)
``````

Explicit(BigInteger to Complex)Explicit(BigInteger to Complex)Explicit(BigInteger to Complex)Explicit(BigInteger to Complex)

BigInteger 値から複素数への明示的な型変換を定義します。Defines an explicit conversion of a BigInteger value to a complex number.

``````public:
static explicit operator System::Numerics::Complex(System::Numerics::BigInteger value);``````
``public static explicit operator System.Numerics.Complex (System.Numerics.BigInteger value);``
``static member op_Explicit : System.Numerics.BigInteger -> System.Numerics.Complex``
``Public Shared Narrowing Operator CType (value As BigInteger) As Complex``

パラメーター

value
BigInteger BigInteger BigInteger BigInteger

例

``````BigInteger[] numbers= {
((BigInteger) Double.MaxValue) * 2,
BigInteger.Parse("901345277852317852466891423"),
BigInteger.One };
foreach (BigInteger number in numbers)
{
Complex c1 = (Complex) number;
Console.WriteLine(c1);
}
// The example displays the following output:
//       (Infinity, 0)
//       (9.01345277852318E+26, 0)
//       (1, 0)
``````
``````Dim numbers() As BigInteger = {
CType(Double.MaxValue, BigInteger) * 2,
BigInteger.Parse("901345277852317852466891423"),
BigInteger.One }
For Each number In numbers
Dim c1 As System.Numerics.Complex = CType(number,
System.Numerics.Complex)
Console.WriteLine(c1)
Next
' The example displays the following output:
'       (Infinity, 0)
'       (9.01345277852318E+26, 0)
'       (1, 0)
``````

注釈

BigInteger値がDouble型の範囲外であるために変換が失敗した場合、操作はをOverflowExceptionスローしません。If the conversion is unsuccessful because the BigInteger value is out of the range of the Double type, the operation does not throw an OverflowException. 代わりに、が`value`よりMinValue小さい場合、結果はと等しいReal NegativeInfinityプロパティ値を持つ複素数になります。Instead, if `value` is less than MinValue, the result is a complex number that has a Real property value equal to NegativeInfinity. `value`よりMaxValue大きい場合、結果はと等しいReal PositiveInfinityプロパティ値を持つ複素数になります。If `value` is greater than MaxValue, the result is a complex number that has a Real property value equal to PositiveInfinity.