Size3D.Explicit Operator

Definition

Converts this Size3D structure into a Vector3D structure or a Point3D structure.

Overloads

Explicit(Size3D to Vector3D)

Converts this Size3D structure into a Vector3D structure.

Explicit(Size3D to Point3D)

Converts this Size3D structure into a Point3D structure.

Explicit(Size3D to Vector3D)

Converts this Size3D structure into a Vector3D structure.

public static explicit operator System.Windows.Media.Media3D.Vector3D(System.Windows.Media.Media3D.Size3D size);

Parameters

size
Size3D

The size to convert.

Returns

The result of converting size.

Examples

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

Applies to

.NET Framework 4.8.1 e outras versões
Produto Versões
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

Explicit(Size3D to Point3D)

Converts this Size3D structure into a Point3D structure.

public static explicit operator System.Windows.Media.Media3D.Point3D(System.Windows.Media.Media3D.Size3D size);

Parameters

size
Size3D

The size to convert.

Returns

The result of converting size.

Examples

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

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

Applies to

.NET Framework 4.8.1 e outras versões
Produto Versões
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10