Vector.ToString Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the string representation of this Vector structure.
Overloads
ToString() |
Returns the string representation of this Vector structure. |
ToString(IFormatProvider) |
Returns the string representation of this Vector structure with the specified formatting information. |
ToString()
Returns the string representation of this Vector structure.
public:
override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String
Returns
A string that represents the X and Y values of this Vector.
Examples
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;
}
Private Function toStringExample() As String
Dim vector1 As New Vector(20, 30)
' vectorString is equal to "20,30".
Dim stringResult As String = vector1.ToString()
Return stringResult
End Function
See also
Applies to
ToString(IFormatProvider)
Returns the string representation of this Vector structure with the specified formatting information.
public:
System::String ^ ToString(IFormatProvider ^ provider);
public string ToString (IFormatProvider provider);
override this.ToString : IFormatProvider -> string
Public Function ToString (provider As IFormatProvider) As String
Parameters
- provider
- IFormatProvider
The culture-specific formatting information.
Returns
A string that represents the X and Y values of this Vector.
See also
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應