Vector.ToString Method ()

 

Returns the string representation of this Vector structure.

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

public override string ToString()

Return Value

Type: System.String

A string that represents the X and Y values of this Vector.

The following example shows how to use this method to get a string representation of a Vector.

private String toStringExample()
{

    Vector vector1 = new Vector(20, 30);

    // vectorString is equal to "20,30".
    String stringResult = vector1.ToString();

    return stringResult;

}

.NET Framework
Available since 3.0
Return to top
Show: