ICSharpHelper.Literal 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
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(Type, Nullable<Boolean>)
Literal(Enum, 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)
Literal(UInt32)
Literal(UInt16)
Literal(TimeSpan)
Literal(TimeOnly)
Literal(String)
Literal(Single)
Literal(SByte)
Literal(Object[,])
Literal(Int64)
Literal(Guid)
Literal(Int16)
Literal(Boolean)
Literal(Int32)
Literal(Byte[])
Literal(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)
Literal(Byte)
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)
Literal(Double)
Literal(Enum)
Literal(DateTime)
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>)
產生可為 Null 的常值。
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
可為 Null 型別的基礎型別。
參數
- value
- Nullable<T>
可為 Null 的值。
傳回
常值。
適用於
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)
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
值,指出是否垂直配置常值。
傳回
常值。