Size3D.Explicit Operator
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
オーバーロード
Explicit(Size3D to Vector3D) | |
Explicit(Size3D to Point3D) |
Explicit(Size3D to Vector3D)
public:
static explicit operator System::Windows::Media::Media3D::Vector3D(System::Windows::Media::Media3D::Size3D size);
public static explicit operator System.Windows.Media.Media3D.Vector3D (System.Windows.Media.Media3D.Size3D size);
static member op_Explicit : System.Windows.Media.Media3D.Size3D -> System.Windows.Media.Media3D.Vector3D
Public Shared Narrowing Operator CType (size As Size3D) As Vector3D
パラメーター
- size
- Size3D
変換するサイズ。
戻り値
size
の変換結果。
例
次の例は、構造体を構造体に明示的に変換する Size3D 方法を Vector3D 示しています。
// Explicitly converts a Size3D structure into a Vector3D structure
// Returns a Vector3D.
Size3D size1 = new Size3D(2, 4, 6);
Vector3D vector1 = new Vector3D();
vector1 = (Vector3D)size1;
// vector1 is equal to (2, 4, 6)
// Displaying Results
syntaxString = "vector1 = (Vector3D)size1;";
resultType = "Vector3D";
operationString = "Expliciting casting a Size3D into a Vector3D";
ShowResults(vector1.ToString(), syntaxString, resultType, operationString);
' Explicitly converts a Size3D structure into a Vector3D structure
' Returns a Vector3D.
Dim size1 As New Size3D(2, 4, 6)
Dim vector1 As New Vector3D()
vector1 = CType(size1, Vector3D)
' vector1 is equal to (2, 4, 6)
' Displaying Results
syntaxString = "vector1 = (Vector3D)size1"
resultType = "Vector3D"
operationString = "Expliciting casting a Size3D into a Vector3D"
ShowResults(vector1.ToString(), syntaxString, resultType, operationString)
適用対象
Explicit(Size3D to Point3D)
public:
static explicit operator System::Windows::Media::Media3D::Point3D(System::Windows::Media::Media3D::Size3D size);
public static explicit operator System.Windows.Media.Media3D.Point3D (System.Windows.Media.Media3D.Size3D size);
static member op_Explicit : System.Windows.Media.Media3D.Size3D -> System.Windows.Media.Media3D.Point3D
Public Shared Narrowing Operator CType (size As Size3D) As Point3D
パラメーター
- size
- Size3D
変換するサイズ。
戻り値
size
の変換結果。
例
次の例は、構造体を構造体に明示的に変換する Size3D 方法を Point3D 示しています。
// Explicitly converts a Size3D structure into a Point3D structure
// Returns a Vector3D.
Size3D size1 = new Size3D(2, 4, 6);
Point3D point1 = new Point3D();
point1 = (Point3D)size1;
// point1 is equal to (2, 4, 6)
// Displaying Results
syntaxString = "point1 = (Point3D)size1;";
resultType = "Point3D";
operationString = "Expliciting casting a Size3D into a Point3D";
ShowResults(point1.ToString(), syntaxString, resultType, operationString);
' Explicitly converts a Size3D structure into a Point3D structure
' Returns a Vector3D.
Dim size1 As New Size3D(2, 4, 6)
Dim point1 As New Point3D()
point1 = CType(size1, Point3D)
' point1 is equal to (2, 4, 6)
' Displaying Results
syntaxString = "point1 = (Point3D)size1"
resultType = "Point3D"
operationString = "Expliciting casting a Size3D into a Point3D"
ShowResults(point1.ToString(), syntaxString, resultType, operationString)
適用対象
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
.NET