SymbolDisplay.FormatPrimitive(Object, Boolean, Boolean) 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 a string representation of an object of primitive type.
public:
static System::String ^ FormatPrimitive(System::Object ^ obj, bool quoteStrings, bool useHexadecimalNumbers);
public static string FormatPrimitive (object obj, bool quoteStrings, bool useHexadecimalNumbers);
static member FormatPrimitive : obj * bool * bool -> string
Public Shared Function FormatPrimitive (obj As Object, quoteStrings As Boolean, useHexadecimalNumbers As Boolean) As String
Parameters
- obj
- Object
A value to display as a string.
- quoteStrings
- Boolean
Whether or not to quote string literals.
- useHexadecimalNumbers
- Boolean
Whether or not to display integral literals in hexadecimal.
Returns
A string representation of an object of primitive type (or null if the type is not supported).
Remarks
Handles Boolean, String, Char, SByteByte, Int16, UInt16, Int32, UInt32, Int64, UInt64, Double, Single, Decimal, and null
.
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈