ICSharpHelper.Literal 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
Literal(BigInteger) |
Generates a BigInteger literal. |
Literal(Type, Nullable<Boolean>) |
Generates a Type literal. |
Literal(Enum, Boolean) |
Generates an enum literal. |
Literal(IReadOnlyList<Object>, Boolean) |
Generates an object array literal. |
Literal(UInt64) |
Generates a ulong literal. |
Literal(UInt32) |
Generates a uint literal. |
Literal(UInt16) |
Generates a ushort literal. |
Literal(TimeSpan) |
Generates a TimeSpan literal. |
Literal(TimeOnly) |
Generates a TimeOnly literal. |
Literal(String) |
Generates a string literal. |
Literal(Single) |
Generates a float literal. |
Literal(SByte) |
Generates a sbyte literal. |
Literal(Object[,]) |
Generates a multidimensional array literal. |
Literal(Int64) |
Generates a long literal. |
Literal(Guid) |
Generates a Guid literal. |
Literal(Int16) |
Generates a short literal. |
Literal(Boolean) |
Generates a bool literal. |
Literal(Int32) |
Generates an int literal. |
Literal(Byte[]) |
Generates a byte array literal. |
Literal(Char) |
Generates a char literal. |
Literal(IReadOnlyList<Object>) |
Generates an object array literal. |
Literal(DateOnly) |
Generates a DateOnly literal. |
Literal(Byte) |
Generates a byte literal. |
Literal(DateTimeOffset) |
Generates a DateTimeOffset literal. |
Literal(Decimal) |
Generates a decimal literal. |
Literal(Double) |
Generates a double literal. |
Literal(Enum) |
Generates an enum literal. |
Literal(DateTime) |
Generates a DateTime literal. |
Literal<T>(IReadOnlyList<T>) |
Generates an array literal. |
Literal<T>(Nullable<T>) |
Generates a nullable literal. |
Literal<T>(List<T>, Boolean) |
Generates a list literal. |
Literal<T>(T[], Boolean) |
Generates an object array literal. |
Literal<TKey,TValue>(Dictionary<TKey,TValue>, Boolean) |
Generates a dictionary literal. |
Literal(BigInteger)
Generates a BigInteger literal.
public string Literal (System.Numerics.BigInteger value);
abstract member Literal : System.Numerics.BigInteger -> string
Public Function Literal (value As BigInteger) As String
Parameters
- value
- BigInteger
The value.
Returns
The literal.
Applies to
Literal(Type, Nullable<Boolean>)
Generates a Type literal.
public string Literal (Type value, bool? fullName = default);
abstract member Literal : Type * Nullable<bool> -> string
Public Function Literal (value As Type, Optional fullName As Nullable(Of Boolean) = Nothing) As String
Parameters
- value
- Type
The value.
Returns
The literal.
Applies to
Literal(Enum, Boolean)
Generates an enum literal.
public string Literal (Enum value, bool fullName = false);
abstract member Literal : Enum * bool -> string
Public Function Literal (value As Enum, Optional fullName As Boolean = false) As String
Parameters
- value
- Enum
The value.
- fullName
- Boolean
Whether the type should be namespace-qualified.
Returns
The literal.
Applies to
Literal(IReadOnlyList<Object>, Boolean)
Generates an object array literal.
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
Parameters
- values
- IReadOnlyList<Object>
The object array.
- vertical
- Boolean
A value indicating whether to layout the literal vertically.
Returns
The literal.
Applies to
Literal(UInt64)
Literal(UInt32)
Literal(UInt16)
Literal(TimeSpan)
Literal(TimeOnly)
Literal(String)
Literal(Single)
Literal(SByte)
Literal(Object[,])
Generates a multidimensional array literal.
public string Literal (object[,] values);
public string Literal (object?[,] values);
abstract member Literal : obj[,] -> string
Public Function Literal (values As Object(,)) As String
Parameters
- values
- Object[,]
The multidimensional array.
Returns
The literal.
Applies to
Literal(Int64)
Literal(Guid)
Literal(Int16)
Literal(Boolean)
Literal(Int32)
Literal(Byte[])
Literal(Char)
Literal(IReadOnlyList<Object>)
Generates an object array literal.
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
Parameters
- values
- IReadOnlyList<Object>
The object array.
Returns
The literal.
Applies to
Literal(DateOnly)
Literal(Byte)
Literal(DateTimeOffset)
Generates a DateTimeOffset literal.
public string Literal (DateTimeOffset value);
abstract member Literal : DateTimeOffset -> string
Public Function Literal (value As DateTimeOffset) As String
Parameters
- value
- DateTimeOffset
The value.
Returns
The literal.
Applies to
Literal(Decimal)
Literal(Double)
Literal(Enum)
Literal(DateTime)
Literal<T>(IReadOnlyList<T>)
Generates an array literal.
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
Type Parameters
- T
The element type of the array.
Parameters
- values
- IReadOnlyList<T>
The array.
Returns
The literal.
Applies to
Literal<T>(Nullable<T>)
Generates a nullable literal.
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
Type Parameters
- T
The underlying type of the nullable type.
Parameters
- value
- Nullable<T>
The nullable value.
Returns
The literal.
Applies to
Literal<T>(List<T>, Boolean)
Generates a list literal.
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
Type Parameters
- T
Parameters
- values
- List<T>
The list.
- vertical
- Boolean
A value indicating whether to layout the literal vertically.
Returns
The literal.
Applies to
Literal<T>(T[], Boolean)
Generates an object array literal.
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
Type Parameters
- T
Parameters
- values
- T[]
The object array.
- vertical
- Boolean
A value indicating whether to layout the literal vertically.
Returns
The literal.
Applies to
Literal<TKey,TValue>(Dictionary<TKey,TValue>, Boolean)
Generates a dictionary literal.
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
Type Parameters
- TKey
- TValue
Parameters
- values
- Dictionary<TKey,TValue>
The dictionary.
- vertical
- Boolean
A value indicating whether to layout the literal vertically.
Returns
The literal.
Applies to
Entity Framework