<PackageReference Include="Relativity.Server.Utility.SDK" Version="5000.2.1" />

kCura.Utility.Array

public class Array
Provides access to static methods for operating over arrays.
public Array()

public static int[] CsvToIntArray(string csv)

Transforms a csv string to an Int32 array.

public static long[] CsvToLongArray(string csv)

Transforms a csv string to an Int64 array.

public static int[] DeleteDuplicates(int[] arr)

Removes duplicate entries from the provided integer array.

public static string[] DeleteDuplicates(string[] arr)

Removes duplicate entries from the provided string array.

public static Array DeleteDuplicates(Array arr)

Removes duplicate entries from the provided array.

public static object[] ExtractArrayFromDataColumn(DataTable dt, string columnName)

Extracts an object array from the specified column of the provided data table.

public static string[] ExtractStringArrayFromDataColumn(DataTable dt, string columnName)

Extracts a string array from the specified column of the provided data table.

public static string IdsCommaDelimitedListToXml(string commaSeparatedListOfIDs)

Transforms a comma-delimited string of integers to XML.

E.g. "1, 2, 3" -> 123

public static string IdsToXml(int[] ids)

Transforms an array of integers to XML.

E.g. {1, 2, 3} -> 123

public static string StringArrayToCsvForSql(string[] stringArray)

Transforms a string array to CSV for use with SQL statements. E.g. { "alpha", "beta", "gamma" } -> "'alpha','beta','gamma'"

public static string ToCsv<T>(T[] array)

Transforms a sequence of values to a comma-delimited string.