ICSharpHelper.Literal 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
Literal(Type, Nullable<Boolean>)
Literal(IReadOnlyList<Object>, Boolean)
產生一個物件陣列的字面值。
public string Literal(System.Collections.Generic.IReadOnlyList<object> values, bool vertical);
abstract member Literal : System.Collections.Generic.IReadOnlyList<obj> * bool -> string
Public Function Literal (values As IReadOnlyList(Of Object), vertical As Boolean) As String
參數
- values
- IReadOnlyList<Object>
物件陣列。
- vertical
- Boolean
一個表示是否垂直排列文字的值。
傳回
字面上的意思。
適用於
Literal(UInt64)
產生一個 ulong 字面值。
public string Literal(ulong value);
abstract member Literal : uint64 -> string
Public Function Literal (value As ULong) As String
參數
- value
- UInt64
值。
傳回
字面上的意思。
適用於
Literal(UInt32)
產生一個字面值。
public string Literal(uint value);
abstract member Literal : uint32 -> string
Public Function Literal (value As UInteger) As String
參數
- value
- UInt32
值。
傳回
字面上的意思。
適用於
Literal(UInt16)
產生一個 ushort 字面值。
public string Literal(ushort value);
abstract member Literal : uint16 -> string
Public Function Literal (value As UShort) As String
參數
- value
- UInt16
值。
傳回
字面上的意思。
適用於
Literal(TimeSpan)
會產生一個 TimeSpan(時間跨度)字面值。
public string Literal(TimeSpan value);
abstract member Literal : TimeSpan -> string
Public Function Literal (value As TimeSpan) As String
參數
- value
- TimeSpan
值。
傳回
字面上的意思。
適用於
Literal(TimeOnly)
會產生一個 TimeOnly 字面值。
public string Literal(TimeOnly value);
abstract member Literal : TimeOnly -> string
Public Function Literal (value As TimeOnly) As String
參數
- value
- TimeOnly
值。
傳回
字面上的意思。
適用於
Literal(String)
產生字串字元。
public string Literal(string? value);
public string Literal(string value);
abstract member Literal : string -> string
Public Function Literal (value As String) As String
參數
- value
- String
值。
傳回
字面上的意思。
適用於
Literal(Single)
會產生一個浮點數值。
public string Literal(float value);
abstract member Literal : single -> string
Public Function Literal (value As Single) As String
參數
- value
- Single
值。
傳回
字面上的意思。
適用於
Literal(SByte)
會產生一個 sbyte literal。
public string Literal(sbyte value);
abstract member Literal : sbyte -> string
Public Function Literal (value As SByte) As String
參數
- value
- SByte
值。
傳回
字面上的意思。
適用於
Literal(Object[,])
產生一個多維陣列的字面值。
public string Literal(object?[,] values);
public string Literal(object[,] values);
abstract member Literal : obj[,] -> string
Public Function Literal (values As Object(,)) As String
參數
- values
- Object[,]
多維陣列。
傳回
字面上的意思。
適用於
Literal(BigInteger)
產生一個 BigInteger 字面值。
public string Literal(System.Numerics.BigInteger value);
abstract member Literal : System.Numerics.BigInteger -> string
Public Function Literal (value As BigInteger) As String
參數
- value
- BigInteger
值。
傳回
字面上的意思。
適用於
Literal(Int64)
產生一個長字面值。
public string Literal(long value);
abstract member Literal : int64 -> string
Public Function Literal (value As Long) As String
參數
- value
- Int64
值。
傳回
字面上的意思。
適用於
Literal(Enum)
產生一個列舉字面值。
public string Literal(Enum value);
abstract member Literal : Enum -> string
Public Function Literal (value As Enum) As String
參數
- value
- Enum
值。
傳回
字面上的意思。
適用於
Literal(Int16)
產生一個簡短的字面值。
public string Literal(short value);
abstract member Literal : int16 -> string
Public Function Literal (value As Short) As String
參數
- value
- Int16
值。
傳回
字面上的意思。
適用於
Literal(Int32)
產生一個 int litral。
public string Literal(int value);
abstract member Literal : int -> string
Public Function Literal (value As Integer) As String
參數
- value
- Int32
值。
傳回
字面上的意思。
適用於
Literal(Byte)
會產生一個位元組的字面值。
public string Literal(byte value);
abstract member Literal : byte -> string
Public Function Literal (value As Byte) As String
參數
- value
- Byte
值。
傳回
字面上的意思。
適用於
Literal(Char)
會產生一個字面字面值。
public string Literal(char value);
abstract member Literal : char -> string
Public Function Literal (value As Char) As String
參數
- value
- Char
值。
傳回
字面上的意思。
適用於
Literal(IReadOnlyList<Object>)
產生一個物件陣列的字面值。
public string Literal(System.Collections.Generic.IReadOnlyList<object> values);
abstract member Literal : System.Collections.Generic.IReadOnlyList<obj> -> string
Public Function Literal (values As IReadOnlyList(Of Object)) As String
參數
- values
- IReadOnlyList<Object>
物件陣列。
傳回
字面上的意思。
適用於
Literal(DateOnly)
產生一個僅約會的字面資料。
public string Literal(DateOnly value);
abstract member Literal : DateOnly -> string
Public Function Literal (value As DateOnly) As String
參數
- value
- DateOnly
值。
傳回
字面上的意思。
適用於
Literal(Boolean)
產生一個布爾字面值。
public string Literal(bool value);
abstract member Literal : bool -> string
Public Function Literal (value As Boolean) As String
參數
- value
- Boolean
值。
傳回
字面上的意思。
適用於
Literal(DateTimeOffset)
產生一個 DateTimeOffset 的字面值。
public string Literal(DateTimeOffset value);
abstract member Literal : DateTimeOffset -> string
Public Function Literal (value As DateTimeOffset) As String
參數
- value
- DateTimeOffset
值。
傳回
字面上的意思。
適用於
Literal(Decimal)
產生一個小數字面值。
public string Literal(decimal value);
abstract member Literal : decimal -> string
Public Function Literal (value As Decimal) As String
參數
- value
- Decimal
值。
傳回
字面上的意思。
適用於
Literal(Double)
產生一個雙重字面值。
public string Literal(double value);
abstract member Literal : double -> string
Public Function Literal (value As Double) As String
參數
- value
- Double
值。
傳回
字面上的意思。
適用於
Literal(DateTime)
產生一個 DateTime 的字面值。
public string Literal(DateTime value);
abstract member Literal : DateTime -> string
Public Function Literal (value As DateTime) As String
參數
- value
- DateTime
值。
傳回
字面上的意思。
適用於
Literal(Guid)
會產生一個 Guid 字面值。
public string Literal(Guid value);
abstract member Literal : Guid -> string
Public Function Literal (value As Guid) As String
參數
- value
- Guid
值。
傳回
字面上的意思。
適用於
Literal<T>(List<T>, Boolean)
會直接產生一份清單。
public string Literal<T>(System.Collections.Generic.List<T> values, bool vertical = false);
abstract member Literal : System.Collections.Generic.List<'T> * bool -> string
Public Function Literal(Of T) (values As List(Of T), Optional vertical As Boolean = false) As String
類型參數
- T
參數
- values
- List<T>
清單。
- vertical
- Boolean
一個表示是否垂直排列文字的值。
傳回
字面上的意思。
適用於
Literal<T>(T[], Boolean)
產生一個物件陣列的字面值。
public string Literal<T>(T[] values, bool vertical = false);
abstract member Literal : 'T[] * bool -> string
Public Function Literal(Of T) (values As T(), Optional vertical As Boolean = false) As String
類型參數
- T
參數
- values
- T[]
物件陣列。
- vertical
- Boolean
一個表示是否垂直排列文字的值。
傳回
字面上的意思。
適用於
Literal<T>(IReadOnlyList<T>)
產生一個 字面值的陣列。
public string Literal<T>(System.Collections.Generic.IReadOnlyList<T> values);
abstract member Literal : System.Collections.Generic.IReadOnlyList<'T> -> string
Public Function Literal(Of T) (values As IReadOnlyList(Of T)) As String
類型參數
- T
陣列的元素類型。
參數
- values
- IReadOnlyList<T>
陣列。
傳回
字面上的意思。
適用於
Literal<T>(Nullable<T>)
產生一個可空的字面值。
public string Literal<T>(T? value) where T : struct;
abstract member Literal : Nullable<'T (requires 'T : struct)> -> string (requires 'T : struct)
Public Function Literal(Of T As Structure) (value As Nullable(Of T)) As String
類型參數
- T
可空化型態的底層型別。
參數
- value
- Nullable<T>
可歸零的值。
傳回
字面上的意思。
適用於
Literal<TKey,TValue>(Dictionary<TKey,TValue>, Boolean)
產生字典字面值。
public string Literal<TKey,TValue>(System.Collections.Generic.Dictionary<TKey,TValue> values, bool vertical = false);
abstract member Literal : System.Collections.Generic.Dictionary<'Key, 'Value> * bool -> string
Public Function Literal(Of TKey, TValue) (values As Dictionary(Of TKey, TValue), Optional vertical As Boolean = false) As String
類型參數
- TKey
- TValue
參數
- values
- Dictionary<TKey,TValue>
字典。
- vertical
- Boolean
一個表示是否垂直排列文字的值。
傳回
字面上的意思。