Size3D Explicit Conversion (Size3D to Vector3D)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Converts this Size3D structure into a Vector3D structure.

Namespace:   System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)

public static explicit operator Vector3D (
	Size3D size


Type: System.Windows.Media.Media3D.Size3D

The size to convert.

Return Value

Type: System.Windows.Media.Media3D.Vector3D

The result of converting size.

The following example shows how to explicitly convert a Size3D structure into a Vector3D structure.

                  // 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);

.NET Framework
Available since 3.0
Return to top