Size3D.Parse Method (String)


Converts a String representation of a three-dimensional size structure into the equivalent Size3D structure.

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

public static Size3D Parse(
	string source


Type: System.String

The String representation of the three-dimensional size structure.

Return Value

Type: System.Windows.Media.Media3D.Size3D

The equivalent Size3D structure.

The following example shows how to turn a string representation of a Size3D into a Size3D structure.

                  // Converts a string representation of a 3-D size into a Size3D structure.

                  Size3D sizeResult = new Size3D();

                  sizeResult = Size3D.Parse("10,20,30");
                  // sizeResult is equal to (10,20,30)

                  // Displaying Results
                  syntaxString = "sizeResult = Size3D.Parse(\"10,20,30\");";
                  resultType = "Size3D";
operationString = "Converting a string into a Size3D structure";
ShowResults(sizeResult.ToString(), syntaxString, resultType, operationString);

.NET Framework
Available since 3.0
Return to top