Table of Contents

Class StaticParse

Namespace
SunamoParsing
Assembly
SunamoParsing.dll

Provides static methods for parsing values from a list of strings by index.

public static class StaticParse
Inheritance
StaticParse
Inherited Members

Methods

GetBool(List<string>, int)

Converts a value to boolean using Convert.ToBoolean from the list at the specified index.

public static bool GetBool(List<string> list, int index)

Parameters

list List<string>

The list of strings to parse from.

index int

The index of the element to convert.

Returns

bool

The converted boolean value.

GetBoolMS(List<string>, int)

Parses a boolean value using bool.Parse from the list at the specified index.

public static bool GetBoolMS(List<string> list, int index)

Parameters

list List<string>

The list of strings to parse from.

index int

The index of the element to parse.

Returns

bool

The parsed boolean value.

GetBoolS(List<string>, int)

Gets a "Yes" or "No" string representation of a boolean value from the list at the specified index.

public static string GetBoolS(List<string> list, int index)

Parameters

list List<string>

The list of strings to parse from.

index int

The index of the element to convert.

Returns

string

"Yes" if the value is true, "No" otherwise.

GetByte(List<string>, int)

Parses a byte value from the list at the specified index.

public static byte GetByte(List<string> list, int index)

Parameters

list List<string>

The list of strings to parse from.

index int

The index of the element to parse.

Returns

byte

The parsed byte value.

GetDateTime(List<string>, int)

Parses a DateTime value in Czech culture format from the list at the specified index.

public static DateTime GetDateTime(List<string> list, int index)

Parameters

list List<string>

The list of strings to parse from.

index int

The index of the element to parse.

Returns

DateTime

The parsed DateTime value.

GetDateTimeS(List<string>, int)

Parses a DateTime and returns its string representation from the list at the specified index.

public static string GetDateTimeS(List<string> list, int index)

Parameters

list List<string>

The list of strings to parse from.

index int

The index of the element to parse.

Returns

string

The string representation of the parsed DateTime.

GetDecimal(List<string>, int)

Parses a decimal value from the list at the specified index.

public static decimal GetDecimal(List<string> list, int index)

Parameters

list List<string>

The list of strings to parse from.

index int

The index of the element to parse.

Returns

decimal

The parsed decimal value.

GetDouble(List<string>, int)

Parses a double value from the list at the specified index.

public static double GetDouble(List<string> list, int index)

Parameters

list List<string>

The list of strings to parse from.

index int

The index of the element to parse.

Returns

double

The parsed double value.

GetFloat(List<string>, int)

Parses a float value from the list at the specified index.

public static float GetFloat(List<string> list, int index)

Parameters

list List<string>

The list of strings to parse from.

index int

The index of the element to parse.

Returns

float

The parsed float value.

GetGuid(List<string>, int)

Parses a Guid value from the list at the specified index.

public static Guid GetGuid(List<string> list, int index)

Parameters

list List<string>

The list of strings to parse from.

index int

The index of the element to parse.

Returns

Guid

The parsed Guid value.

GetImage(List<string>, int)

Gets an image as a byte array from the list at the specified index. Returns null if the value is DBNull.

public static byte[]? GetImage(List<string> list, int index)

Parameters

list List<string>

The list of strings to parse from.

index int

The index of the element to retrieve.

Returns

byte[]

The byte array representing the image, or null if DBNull.

GetInt(List<string>, int)

Parses an integer value from the list at the specified index.

public static int GetInt(List<string> list, int index)

Parameters

list List<string>

The list of strings to parse from.

index int

The index of the element to parse.

Returns

int

The parsed integer value.

GetLong(List<string>, int)

Parses a long value from the list at the specified index.

public static long GetLong(List<string> list, int index)

Parameters

list List<string>

The list of strings to parse from.

index int

The index of the element to parse.

Returns

long

The parsed long value.

GetShort(List<string>, int)

Parses a short value from the list at the specified index.

public static short GetShort(List<string> list, int index)

Parameters

list List<string>

The list of strings to parse from.

index int

The index of the element to parse.

Returns

short

The parsed short value.

GetString(List<string>, int)

Gets a trimmed string value from the list at the specified index.

public static string GetString(List<string> list, int index)

Parameters

list List<string>

The list of strings to parse from.

index int

The index of the element to retrieve.

Returns

string

The trimmed string value at the specified index.