Size3D.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.
Overloads
ToString() | |
ToString(IFormatProvider) |
ToString()
public:
override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String
Returns
Returns a String containing the X, Y, and Z values of this Size3D structure.
Examples
The following example shows how to get a string representation of a Size3D structure.
// Gets a string representation of a Size3D Structure
Size3D size1 = new Size3D(2,4,6);
String sizeString;
sizeString = size1.ToString();
// sizeString is equal to "2,4,6"
// Displaying Results
resultType = "String";
syntaxString = "sizeString = size1.ToString();";
operationString = "Getting the ToString of size1";
ShowResults(sizeString.ToString(), syntaxString, resultType, operationString);
' Gets a string representation of a Size3D Structure
Dim size1 As New Size3D(2,4,6)
Dim sizeString As String
sizeString = size1.ToString()
' sizeString is equal to "2,4,6"
' Displaying Results
resultType = "String"
syntaxString = "sizeString = size1.ToString()"
operationString = "Getting the ToString of size1"
ShowResults(sizeString.ToString(), syntaxString, resultType, operationString)
Remarks
If a Size3D structure is empty, the string "empty" is returned, rather than the X, Y, and Z values of the Size3D structure.
Applies to
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
Parameters
- provider
- IFormatProvider
Culture-specific formatting information.
Returns
Returns a String containing the X, Y, and Z values of this Size3D structure.
Remarks
If a Size3D structure is empty, the string "empty" is returned, rather than the X, Y, and Z values of the Size3D structure.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應