Point4D.ToString 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
ToString() | |
ToString(IFormatProvider) |
ToString()
public:
override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String
傳回
傳回 String,其中包含這個 X 結構的 Y、Z、W 和 Point4D 值。
範例
下列範例示範如何取得 結構的字串表示 Point4D 。
// Gets a string representation of the structure
Point4D point1 = new Point4D(10, 5, 1, 4);
String pointString;
pointString = point1.ToString();
// matrixString is equal to 10, 5, 1, 4
// Displaying Results
syntaxString = "pointString = point1.ToString();";
resultType = "String";
operationString = "Getting the string representation of a Point4D";
ShowResults(pointString.ToString(), syntaxString, resultType, operationString);
' Gets a string representation of the structure
Dim point1 As New Point4D(10, 5, 1, 4)
Dim pointString As String
pointString = point1.ToString()
' matrixString is equal to 10, 5, 1, 4
' Displaying Results
syntaxString = "pointString = point1.ToString()"
resultType = "String"
operationString = "Getting the string representation of a Point4D"
ShowResults(pointString.ToString(), syntaxString, resultType, operationString)
適用於
ToString(IFormatProvider)
public:
System::String ^ ToString(IFormatProvider ^ provider);
public string ToString (IFormatProvider provider);
override this.ToString : IFormatProvider -> string
Public Function ToString (provider As IFormatProvider) As String
參數
- provider
- IFormatProvider
文化特性 (Culture) 特有的格式資訊。
傳回
傳回 String,其中包含這個 X 結構的 Y、Z、W 和 Point4D 值。
範例
下列範例示範如何取得 結構的字串表示 Point4D 。
// Gets a string representation of the structure
Point4D point1 = new Point4D(10, 5, 1, 4);
String pointString;
pointString = point1.ToString();
// matrixString is equal to 10, 5, 1, 4
// Displaying Results
syntaxString = "pointString = point1.ToString();";
resultType = "String";
operationString = "Getting the string representation of a Point4D";
ShowResults(pointString.ToString(), syntaxString, resultType, operationString);
' Gets a string representation of the structure
Dim point1 As New Point4D(10, 5, 1, 4)
Dim pointString As String
pointString = point1.ToString()
' matrixString is equal to 10, 5, 1, 4
' Displaying Results
syntaxString = "pointString = point1.ToString()"
resultType = "String"
operationString = "Getting the string representation of a Point4D"
ShowResults(pointString.ToString(), syntaxString, resultType, operationString)