Vector.Parse(String) Metod

Definition

Konverterar en strängrepresentation av en vektor till motsvarande Vector struktur.

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

Parametrar

source
String

Strängrepresentationen av vektorn.

Returer

Motsvarande Vector struktur.

Exempel

I följande exempel visas hur du använder den här metoden för att konvertera en strängrepresentation av en vektor till en Vector struktur.

private Vector parseExample()
{

    // Convert string into a Vector structure.
    // vectorResult is equal to (1,3)
    Vector vectorResult = Vector.Parse("1,3");

    return vectorResult;
}
Private Function parseExample() As Vector

    ' Convert string into a Vector structure.
    ' vectorResult is equal to (1,3)
    Dim vectorResult As Vector = Vector.Parse("1,3")

    Return vectorResult

End Function

Gäller för

Se även