共用方式為


Complex.Implicit 運算子

定義

定義了物件與其他類型之間的 Complex 隱含轉換。

多載

名稱 Description
Implicit(SByte to Complex)

定義了將有符號位元組隱式轉換為複數的方式。

此 API 不符合 CLS 規範。

Implicit(UIntPtr to Complex)

隱式地將一個 UIntPtr 值轉換為雙精度複數。

Implicit(UInt64 to Complex)

定義了將 64 位元無符號整數隱式轉換為複數的方法。

此 API 不符合 CLS 規範。

Implicit(UInt32 to Complex)

定義了將 32 位元無符號整數隱式轉換為複數的方法。

此 API 不符合 CLS 規範。

Implicit(UInt16 to Complex)

定義了將16位元無符號整數隱式轉換為複數的方法。

此 API 不符合 CLS 規範。

Implicit(Single to Complex)

定義了將單精度浮點數隱式轉換為複數的過程。

Implicit(BFloat16 to Complex)
Implicit(Int32 to Complex)

定義了將 32 位元有符號整數隱含轉換為複數的方法。

Implicit(Int64 to Complex)

定義了將 64 位元有符號整數隱式轉換為複數的方法。

Implicit(IntPtr to Complex)

隱式地將一個 IntPtr 值轉換為雙精度複數。

Implicit(Int16 to Complex)

定義了將 16 位元有符號整數隱式轉換為複數的方法。

Implicit(Half to Complex)

隱式地將一個 Half 值轉換為雙精度複數。

Implicit(Double to Complex)

定義了將雙精度浮點數隱式轉換為複數的方法。

Implicit(Char to Complex)

隱式地將一個 Char 值轉換為雙精度複數。

Implicit(Byte to Complex)

定義了將無符號位元組隱式轉換為複數的方法。

Implicit(SByte to Complex)

來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs

重要

此 API 不符合 CLS 規範。

定義了將有符號位元組隱式轉換為複數的方式。

此 API 不符合 CLS 規範。

public:
 static operator System::Numerics::Complex(System::SByte value);
[System.CLSCompliant(false)]
public static implicit operator System.Numerics.Complex(sbyte value);
[<System.CLSCompliant(false)>]
static member op_Implicit : sbyte -> System.Numerics.Complex
Public Shared Widening Operator CType (value As SByte) As Complex

參數

value
SByte

轉換成複數的值。

傳回

一個物件,其 value 參數值為實部,零為虛部。

屬性

備註

操作符的 Implicit 超載定義了編譯器能自動轉換 Complex 物件的類型,無需明確的鑄造運算子(在 C# 中)或呼叫轉換函式(在 Visual Basic 中)。 他們擴大了轉換,且不會涉及資料遺失,也不會拋出 OverflowException

這種過載讓編譯器能處理從有符號位元組到複數的轉換,如下範例所示。 請注意,轉換結果是一個複數,其實部等於有符號的位元組,虛部等於零。

sbyte sbyteValue = -12;
System.Numerics.Complex c1 = sbyteValue;
Console.WriteLine(c1);
// The example displays the following output:
//       (-12, 0)
let sbyteValue = -12
let c1: System.Numerics.Complex = sbyteValue
printfn $"{c1}"
// The example displays the following output:
//       (-12, 0)
Dim sbyteValue As SByte = -12
Dim c1 As System.Numerics.Complex = sbyteValue
Console.WriteLine(c1)
' The example displays the following output:
'       (-12, 0)

適用於

Implicit(UIntPtr to Complex)

來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs

重要

此 API 不符合 CLS 規範。

隱式地將一個 UIntPtr 值轉換為雙精度複數。

public:
 static operator System::Numerics::Complex(UIntPtr value);
[System.CLSCompliant(false)]
public static implicit operator System.Numerics.Complex(UIntPtr value);
[<System.CLSCompliant(false)>]
static member op_Implicit : unativeint -> System.Numerics.Complex
Public Shared Widening Operator CType (value As UIntPtr) As Complex

參數

value
UIntPtr

unativeint

要轉換的值。

傳回

value 轉換為雙精度複數。

屬性

適用於

Implicit(UInt64 to Complex)

來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs

重要

此 API 不符合 CLS 規範。

定義了將 64 位元無符號整數隱式轉換為複數的方法。

此 API 不符合 CLS 規範。

public:
 static operator System::Numerics::Complex(System::UInt64 value);
[System.CLSCompliant(false)]
public static implicit operator System.Numerics.Complex(ulong value);
[<System.CLSCompliant(false)>]
static member op_Implicit : uint64 -> System.Numerics.Complex
Public Shared Widening Operator CType (value As ULong) As Complex

參數

value
UInt64

轉換成複數的值。

傳回

一個物件,其 value 參數值為實部,零為虛部。

屬性

備註

操作符的 Implicit 超載定義了編譯器能自動轉換 Complex 物件的類型,無需明確的鑄造運算子(在 C# 中)或呼叫轉換函式(在 Visual Basic 中)。 他們擴大了轉換,且不會涉及資料遺失,也不會拋出 OverflowException

這種過載讓編譯器能處理從無符號 64 位元整數轉換到複數的轉換,如下範例所示。 請注意,轉換結果是一個複數,其實部等於無號的64位元整數,虛部等於零。

ulong longValue = 951034217;
System.Numerics.Complex c1 = longValue;
Console.WriteLine(c1);
// The example displays the following output:
//       (951034217, 0)
let longValue = 951034217
let c1: System.Numerics.Complex = longValue
printfn $"{c1}"
// The example displays the following output:
//       (951034217, 0)
Dim longValue As ULong = 951034217
Dim c1 As System.Numerics.Complex = longValue
Console.WriteLine(c1)
' The example displays the following output:
'       (951034217, 0)

適用於

Implicit(UInt32 to Complex)

來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs

重要

此 API 不符合 CLS 規範。

定義了將 32 位元無符號整數隱式轉換為複數的方法。

此 API 不符合 CLS 規範。

public:
 static operator System::Numerics::Complex(System::UInt32 value);
[System.CLSCompliant(false)]
public static implicit operator System.Numerics.Complex(uint value);
[<System.CLSCompliant(false)>]
static member op_Implicit : uint32 -> System.Numerics.Complex
Public Shared Widening Operator CType (value As UInteger) As Complex

參數

value
UInt32

轉換成複數的值。

傳回

一個物件,其 value 參數值為實部,零為虛部。

屬性

備註

操作符的 Implicit 超載定義了編譯器能自動轉換 Complex 物件的類型,無需明確的鑄造運算子(在 C# 中)或呼叫轉換函式(在 Visual Basic 中)。 他們擴大了轉換,且不會涉及資料遺失,也不會拋出 OverflowException

這種過載讓編譯器能處理從無符號 32 位元整數轉換到複數的轉換,如下範例所示。 請注意,轉換結果是一個複數,其實部等於無號32位元整數,虛部等於零。

uint value = 197461;
System.Numerics.Complex c1 = value;
Console.WriteLine(c1);
// The example displays the following output:
//       (197461, 0)
let value = 197461
let c1: System.Numerics.Complex = value
printfn $"{c1}"
// The example displays the following output:
//       (197461, 0)
Dim intValue As UInteger = 197461
Dim c1 As System.Numerics.Complex = intValue
Console.WriteLine(c1)
' The example displays the following output:
'       (197461, 0)

適用於

Implicit(UInt16 to Complex)

來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs

重要

此 API 不符合 CLS 規範。

定義了將16位元無符號整數隱式轉換為複數的方法。

此 API 不符合 CLS 規範。

public:
 static operator System::Numerics::Complex(System::UInt16 value);
[System.CLSCompliant(false)]
public static implicit operator System.Numerics.Complex(ushort value);
[<System.CLSCompliant(false)>]
static member op_Implicit : uint16 -> System.Numerics.Complex
Public Shared Widening Operator CType (value As UShort) As Complex

參數

value
UInt16

轉換成複數的值。

傳回

一個物件,其 value 參數值為實部,零為虛部。

屬性

備註

操作符的 Implicit 超載定義了編譯器能自動轉換 Complex 物件的類型,無需明確的鑄造運算子(在 C# 中)或呼叫轉換函式(在 Visual Basic 中)。 他們擴大了轉換,且不會涉及資料遺失,也不會拋出 OverflowException

這種超載讓編譯器能處理從無符號 16 位元整數轉換到複數的轉換,如下範例所示。 請注意,轉換結果是一個複數,其實部等於無號16位元整數,虛部等於零。

ushort shortValue = 421;
System.Numerics.Complex c1 = shortValue;
Console.WriteLine(c1);
// The example displays the following output:
//       (421, 0)
let shortValue = 421
let c1: System.Numerics.Complex = shortValue
printfn $"{c1}"
// The example displays the following output:
//       (421, 0)
Dim shortValue As UShort = 421
Dim c1 As System.Numerics.Complex = shortValue
Console.WriteLine(c1)
' The example displays the following output:
'       (421, 0)

適用於

Implicit(Single to Complex)

來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs

定義了將單精度浮點數隱式轉換為複數的過程。

public:
 static operator System::Numerics::Complex(float value);
public static implicit operator System.Numerics.Complex(float value);
static member op_Implicit : single -> System.Numerics.Complex
Public Shared Widening Operator CType (value As Single) As Complex

參數

value
Single

轉換成複數的值。

傳回

一個物件,其 value 參數值為實部,零為虛部。

備註

操作符的 Implicit 超載定義了編譯器能自動轉換 Complex 物件的類型,無需明確的鑄造運算子(在 C# 中)或呼叫轉換函式(在 Visual Basic 中)。 他們擴大了轉換,且不會涉及資料遺失,也不會拋出 OverflowException

這種超載讓編譯器能處理從一個 Single 值轉換到複數的轉換,如下範例所示。 注意,轉換結果是一個複數,其實部等於該 Single 值,虛部等於零。

float singleValue = 1.032e-08f;
System.Numerics.Complex c1 = singleValue;
Console.WriteLine(c1);
// The example displays the following output:
//       (1.03199999657022E-08, 0)
let singleValue = 1.032e-08f
let c1: System.Numerics.Complex = singleValue
printfn $"{c1}"
// The example displays the following output:
//       (1.03199999657022E-08, 0)
Dim singleValue As Single = 1.032e-08
Dim c1 As System.Numerics.Complex = singleValue
Console.WriteLine(c1)
' The example displays the following output:
'       (1.03199999657022E-08, 0)

適用於

Implicit(BFloat16 to Complex)

public:
 static operator System::Numerics::Complex(System::Numerics::BFloat16 value);
public static implicit operator System.Numerics.Complex(System.Numerics.BFloat16 value);
static member op_Implicit : System.Numerics.BFloat16 -> System.Numerics.Complex
Public Shared Widening Operator CType (value As BFloat16) As Complex

參數

value
BFloat16

傳回

適用於

Implicit(Int32 to Complex)

來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs

定義了將 32 位元有符號整數隱含轉換為複數的方法。

public:
 static operator System::Numerics::Complex(int value);
public static implicit operator System.Numerics.Complex(int value);
static member op_Implicit : int -> System.Numerics.Complex
Public Shared Widening Operator CType (value As Integer) As Complex

參數

value
Int32

轉換成複數的值。

傳回

一個物件,其 value 參數值為實部,零為虛部。

備註

操作符的 Implicit 超載定義了編譯器能自動轉換 Complex 物件的類型,無需明確的鑄造運算子(在 C# 中)或呼叫轉換函式(在 Visual Basic 中)。 他們擴大了轉換,且不會涉及資料遺失,也不會拋出 OverflowException

這種過載讓編譯器能處理從有符號的 32 位元整數轉換到複數的轉換,如下範例所示。 請注意,轉換結果是一個複數,其實部等於有號的32位元整數,虛部等於零。

int intValue = 1034217;
System.Numerics.Complex c1 = intValue;
Console.WriteLine(c1);
// The example displays the following output:
//       (1034217, 0)
let intValue = 1034217
let c1: System.Numerics.Complex = intValue
printfn $"{c1}"
// The example displays the following output:
//       (1034217, 0)
Dim intValue As Integer = 1034217
Dim c1 As System.Numerics.Complex = intValue
Console.WriteLine(c1)
' The example displays the following output:
'       (1034217, 0)

適用於

Implicit(Int64 to Complex)

來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs

定義了將 64 位元有符號整數隱式轉換為複數的方法。

public:
 static operator System::Numerics::Complex(long value);
public static implicit operator System.Numerics.Complex(long value);
static member op_Implicit : int64 -> System.Numerics.Complex
Public Shared Widening Operator CType (value As Long) As Complex

參數

value
Int64

轉換成複數的值。

傳回

一個物件,其 value 參數值為實部,零為虛部。

備註

操作符的 Implicit 超載定義了編譯器能自動轉換 Complex 物件的類型,無需明確的鑄造運算子(在 C# 中)或呼叫轉換函式(在 Visual Basic 中)。 他們擴大了轉換,且不會涉及資料遺失,也不會拋出 OverflowException

這種過載讓編譯器能處理從有符號的 64 位元整數轉換到複數的轉換,如下範例所示。 請注意,轉換結果是一個複數,其實部等於有號的64位元整數,虛部等於零。

long longValue = 951034217;
System.Numerics.Complex c1 = longValue;
Console.WriteLine(c1);
// The example displays the following output:
//       (951034217, 0)
let longValue = 951034217
let c1: System.Numerics.Complex = longValue
printfn $"{c1}"
// The example displays the following output:
//       (951034217, 0)
Dim longValue As Long = 951034217
Dim c1 As System.Numerics.Complex = longValue
Console.WriteLine(c1)
' The example displays the following output:
'       (951034217, 0)

適用於

Implicit(IntPtr to Complex)

來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs

隱式地將一個 IntPtr 值轉換為雙精度複數。

public:
 static operator System::Numerics::Complex(IntPtr value);
public static implicit operator System.Numerics.Complex(IntPtr value);
static member op_Implicit : nativeint -> System.Numerics.Complex
Public Shared Widening Operator CType (value As IntPtr) As Complex

參數

value
IntPtr

nativeint

要轉換的值。

傳回

value 轉換為雙精度複數。

適用於

Implicit(Int16 to Complex)

來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs

定義了將 16 位元有符號整數隱式轉換為複數的方法。

public:
 static operator System::Numerics::Complex(short value);
public static implicit operator System.Numerics.Complex(short value);
static member op_Implicit : int16 -> System.Numerics.Complex
Public Shared Widening Operator CType (value As Short) As Complex

參數

value
Int16

轉換成複數的值。

傳回

一個物件,其 value 參數值為實部,零為虛部。

備註

操作符的 Implicit 超載定義了編譯器能自動轉換 Complex 物件的類型,無需明確的鑄造運算子(在 C# 中)或呼叫轉換函式(在 Visual Basic 中)。 他們擴大了轉換,且不會涉及資料遺失,也不會拋出 OverflowException

這種過載讓編譯器能處理從有符號的 16 位元整數轉換到複數,如下範例所示。 請注意,轉換結果是一個複數,其實部等於有符號的16位元整數,虛部等於零。

short shortValue = 16024;
System.Numerics.Complex c1 = shortValue;
Console.WriteLine(c1);
// The example displays the following output:
//       (16024, 0)
let shortValue = 16024
let c1: System.Numerics.Complex = shortValue
printfn $"{c1}"
// The example displays the following output:
//       (16024, 0)
Dim shortValue As Short = 16024
Dim c1 As System.Numerics.Complex = shortValue
Console.WriteLine(c1)
' The example displays the following output:
'       (16024, 0)

適用於

Implicit(Half to Complex)

來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs

隱式地將一個 Half 值轉換為雙精度複數。

public:
 static operator System::Numerics::Complex(Half value);
public static implicit operator System.Numerics.Complex(Half value);
static member op_Implicit : Half -> System.Numerics.Complex
Public Shared Widening Operator CType (value As Half) As Complex

參數

value
Half

要轉換的值。

傳回

value 轉換為雙精度複數。

適用於

Implicit(Double to Complex)

來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs

定義了將雙精度浮點數隱式轉換為複數的方法。

public:
 static operator System::Numerics::Complex(double value);
public static implicit operator System.Numerics.Complex(double value);
static member op_Implicit : double -> System.Numerics.Complex
Public Shared Widening Operator CType (value As Double) As Complex

參數

value
Double

轉換成複數的值。

傳回

一個物件,其 value 參數值為實部,零為虛部。

備註

操作符的 Implicit 超載定義了編譯器能自動轉換 Complex 物件的類型,無需明確的鑄造運算子(在 C# 中)或呼叫轉換函式(在 Visual Basic 中)。 他們擴大了轉換,且不會涉及資料遺失,也不會拋出 OverflowException

這種超載讓編譯器能處理從一個 Double 值轉換到複數的轉換,如下範例所示。 注意,轉換結果是一個複數,其實部等於該 Double 值,虛部等於零。

double doubleValue = 1.032e-16;
System.Numerics.Complex c1 = doubleValue;
Console.WriteLine(c1);
// The example displays the following output:
//       (1.032E-16, 0)
let doubleValue = 1.032e-16
let c1: System.Numerics.Complex = doubleValue
printfn $"{c1}"
// The example displays the following output:
//       (1.032E-16, 0)
Dim doubleValue As Double = 1.032e-16
Dim c1 As System.Numerics.Complex = doubleValue
Console.WriteLine(c1)
' The example displays the following output:
'       (1.032E-16, 0)

適用於

Implicit(Char to Complex)

來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs

隱式地將一個 Char 值轉換為雙精度複數。

public:
 static operator System::Numerics::Complex(char value);
public static implicit operator System.Numerics.Complex(char value);
static member op_Implicit : char -> System.Numerics.Complex
Public Shared Widening Operator CType (value As Char) As Complex

參數

value
Char

要轉換的值。

傳回

value 轉換為雙精度複數。

適用於

Implicit(Byte to Complex)

來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs
來源:
Complex.cs

定義了將無符號位元組隱式轉換為複數的方法。

public:
 static operator System::Numerics::Complex(System::Byte value);
public static implicit operator System.Numerics.Complex(byte value);
static member op_Implicit : byte -> System.Numerics.Complex
Public Shared Widening Operator CType (value As Byte) As Complex

參數

value
Byte

轉換成複數的值。

傳回

一個物件,其 value 參數值為實部,零為虛部。

備註

操作符的 Implicit 超載定義了編譯器能自動轉換 Complex 物件的類型,無需明確的鑄造運算子(在 C# 中)或呼叫轉換函式(在 Visual Basic 中)。 他們擴大了轉換,且不會涉及資料遺失,也不會拋出 OverflowException

這種超載讓編譯器能處理從一個 Byte 值轉換到複數的轉換,如下範例所示。 注意,轉換結果是一個複數,其實部等於該 Byte 值,虛部等於零。

byte byteValue = 122;
System.Numerics.Complex c1 = byteValue;
Console.WriteLine(c1);
// The example displays the following output:
//       (122, 0)
let byteValue = 122
let c1: System.Numerics.Complex = byteValue
printfn $"{c1}"
// The example displays the following output:
//       (122, 0)
Dim byteValue As Byte = 122
Dim c1 As System.Numerics.Complex = byteValue
Console.WriteLine(c1)
' The example displays the following output:
'       (122, 0)

適用於