Partager via


Size3D.Parse(String) Méthode

Définition

Convertit une représentation String d'une structure de taille tridimensionnelle en une structure Size3D équivalente.

public:
 static System::Windows::Media::Media3D::Size3D Parse(System::String ^ source);
public static System.Windows.Media.Media3D.Size3D Parse (string source);
static member Parse : string -> System.Windows.Media.Media3D.Size3D
Public Shared Function Parse (source As String) As Size3D

Paramètres

source
String

Représentation String de la structure de taille tridimensionnelle.

Retours

Size3D

Structure Size3D équivalente.

Exemples

L’exemple suivant montre comment transformer une représentation sous forme de chaîne d’une Size3D 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);
' Converts a string representation of a 3-D size into a Size3D structure.

Dim sizeResult As 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)

S’applique à