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
区域性特定的格式设置信息。
返回
返回包含此 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)