Vector.Parse Method (String)


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

Converts a string representation of a vector into the equivalent Vector structure.

Namespace:   System.Windows
Assembly:  WindowsBase (in WindowsBase.dll)

public static Vector Parse(
	string source


Type: System.String

The string representation of the vector.

Return Value

Type: System.Windows.Vector

The equivalent Vector structure.

The following example shows how to use this method to convert a string representation of a vector into a Vector structure.

private Vector parseExample()

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

    return vectorResult;


.NET Framework
Available since 3.0
Return to top