Share via


ICSharpHelper.Literal Method

Definition

Overloads

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(BigInteger)

Generates a BigInteger literal.

Literal(Int64)

Generates a long literal.

Literal(Guid)

Generates a Guid literal.

Literal(Int16)

Generates a short literal.

Literal(Int32)

Generates an int literal.

Literal(Byte)

Generates a byte 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(Boolean)

Generates a bool 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>(List<T>, Boolean)

Generates a list literal.

Literal<T>(T[], Boolean)

Generates an object array literal.

Literal<T>(IReadOnlyList<T>)

Generates an array literal.

Literal<T>(Nullable<T>)

Generates a nullable literal.

Literal<TKey,TValue>(Dictionary<TKey,TValue>, Boolean)

Generates a dictionary literal.

Literal(Type, Nullable<Boolean>)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

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.

fullName
Nullable<Boolean>

Whether the type should be namespace-qualified.

Returns

The literal.

Applies to

Literal(Enum, Boolean)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

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)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates a ulong literal.

public string Literal (ulong value);
abstract member Literal : uint64 -> string
Public Function Literal (value As ULong) As String

Parameters

value
UInt64

The value.

Returns

The literal.

Applies to

Literal(UInt32)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates a uint literal.

public string Literal (uint value);
abstract member Literal : uint32 -> string
Public Function Literal (value As UInteger) As String

Parameters

value
UInt32

The value.

Returns

The literal.

Applies to

Literal(UInt16)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates a ushort literal.

public string Literal (ushort value);
abstract member Literal : uint16 -> string
Public Function Literal (value As UShort) As String

Parameters

value
UInt16

The value.

Returns

The literal.

Applies to

Literal(TimeSpan)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates a TimeSpan literal.

public string Literal (TimeSpan value);
abstract member Literal : TimeSpan -> string
Public Function Literal (value As TimeSpan) As String

Parameters

value
TimeSpan

The value.

Returns

The literal.

Applies to

Literal(TimeOnly)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates a TimeOnly literal.

public string Literal (TimeOnly value);
abstract member Literal : TimeOnly -> string
Public Function Literal (value As TimeOnly) As String

Parameters

value
TimeOnly

The value.

Returns

The literal.

Applies to

Literal(String)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates a string literal.

public string Literal (string value);
public string Literal (string? value);
abstract member Literal : string -> string
Public Function Literal (value As String) As String

Parameters

value
String

The value.

Returns

The literal.

Applies to

Literal(Single)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates a float literal.

public string Literal (float value);
abstract member Literal : single -> string
Public Function Literal (value As Single) As String

Parameters

value
Single

The value.

Returns

The literal.

Applies to

Literal(SByte)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates a sbyte literal.

public string Literal (sbyte value);
abstract member Literal : sbyte -> string
Public Function Literal (value As SByte) As String

Parameters

value
SByte

The value.

Returns

The literal.

Applies to

Literal(Object[,])

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

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(BigInteger)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

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(Int64)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates a long literal.

public string Literal (long value);
abstract member Literal : int64 -> string
Public Function Literal (value As Long) As String

Parameters

value
Int64

The value.

Returns

The literal.

Applies to

Literal(Guid)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates a Guid literal.

public string Literal (Guid value);
abstract member Literal : Guid -> string
Public Function Literal (value As Guid) As String

Parameters

value
Guid

The value.

Returns

The literal.

Applies to

Literal(Int16)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates a short literal.

public string Literal (short value);
abstract member Literal : int16 -> string
Public Function Literal (value As Short) As String

Parameters

value
Int16

The value.

Returns

The literal.

Applies to

Literal(Int32)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates an int literal.

public string Literal (int value);
abstract member Literal : int -> string
Public Function Literal (value As Integer) As String

Parameters

value
Int32

The value.

Returns

The literal.

Applies to

Literal(Byte)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates a byte literal.

public string Literal (byte value);
abstract member Literal : byte -> string
Public Function Literal (value As Byte) As String

Parameters

value
Byte

The value.

Returns

The literal.

Applies to

Literal(Byte[])

Generates a byte array literal.

public string Literal (byte[] values);
abstract member Literal : byte[] -> string
Public Function Literal (values As Byte()) As String

Parameters

values
Byte[]

The byte array.

Returns

The literal.

Applies to

Literal(Char)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates a char literal.

public string Literal (char value);
abstract member Literal : char -> string
Public Function Literal (value As Char) As String

Parameters

value
Char

The value.

Returns

The literal.

Applies to

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)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates a DateOnly literal.

public string Literal (DateOnly value);
abstract member Literal : DateOnly -> string
Public Function Literal (value As DateOnly) As String

Parameters

value
DateOnly

The value.

Returns

The literal.

Applies to

Literal(Boolean)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates a bool literal.

public string Literal (bool value);
abstract member Literal : bool -> string
Public Function Literal (value As Boolean) As String

Parameters

value
Boolean

The value.

Returns

The literal.

Applies to

Literal(DateTimeOffset)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

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)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates a decimal literal.

public string Literal (decimal value);
abstract member Literal : decimal -> string
Public Function Literal (value As Decimal) As String

Parameters

value
Decimal

The value.

Returns

The literal.

Applies to

Literal(Double)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates a double literal.

public string Literal (double value);
abstract member Literal : double -> string
Public Function Literal (value As Double) As String

Parameters

value
Double

The value.

Returns

The literal.

Applies to

Literal(Enum)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates an enum literal.

public string Literal (Enum value);
abstract member Literal : Enum -> string
Public Function Literal (value As Enum) As String

Parameters

value
Enum

The value.

Returns

The literal.

Applies to

Literal(DateTime)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates a DateTime literal.

public string Literal (DateTime value);
abstract member Literal : DateTime -> string
Public Function Literal (value As DateTime) As String

Parameters

value
DateTime

The value.

Returns

The literal.

Applies to

Literal<T>(List<T>, Boolean)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

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)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

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<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>)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

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<TKey,TValue>(Dictionary<TKey,TValue>, Boolean)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

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