共用方式為


Vector3D.Length 屬性

定義

取得這個 Vector3D 結構的長度。

public:
 property double Length { double get(); };
public double Length { get; }
member this.Length : double
Public ReadOnly Property Length As Double

屬性值

Double

這個 Vector3D 結構的長度。

範例

下列範例示範如何取得 結構的長度 Vector3D

// Gets the length of a Vector3D.  
// Returns a Double.

Vector3D vector1 = new Vector3D(20, 30, 40);
Double length;

length = vector1.Length;
// length is approximately equal to 53.85165
' Gets the length of a Vector3D.  
' Returns a Double.

Dim vector1 As New Vector3D(20, 30, 40)
Dim length As Double

length = vector1.Length
' length is approximately equal to 53.85165

備註

Vector3D 長度有時稱為大小。

適用於