Class ABC
- Namespace
- SunamoData.Data
- Assembly
- SunamoData.dll
Represents a collection of AB (key-value pair) items.
public class ABC : List<AB>, IList<AB>, ICollection<AB>, IReadOnlyList<AB>, IReadOnlyCollection<AB>, IEnumerable<AB>, IList, ICollection, IEnumerable
- Inheritance
-
ABC
- Implements
- Inherited Members
- Extension Methods
Constructors
ABC()
Initializes a new instance of the ABC class.
public ABC()
ABC(params AB[])
Initializes a new instance of the ABC class from an array of AB objects.
public ABC(params AB[] abc)
Parameters
abcAB[]Array of AB objects to add to the collection.
ABC(int)
Initializes a new instance of the ABC class with the specified capacity filled with null values.
public ABC(int capacity)
Parameters
capacityintThe number of null elements to pre-allocate.
ABC(params object[])
Initializes a new instance of the ABC class from various input types. Supports AB objects, ABC collections, or name-value pairs.
public ABC(params object[] setsNameValue)
Parameters
setsNameValueobject[]Variable number of parameters that can be AB objects, ABC collections, or alternating name-value pairs.
Properties
Empty
Gets an empty ABC instance.
public static ABC Empty { get; }
Property Value
Length
Gets the number of elements in the collection.
public int Length { get; }
Property Value
Methods
OnlyAs()
Returns a list containing only the keys (A part) from all AB pairs.
public List<string> OnlyAs()
Returns
OnlyBs()
Returns an array containing only the values (B part) from all AB pairs. Must be an array due to SQL requirements. See: https://stackoverflow.com/questions/9149919/no-mapping-exists-from-object-type-system-collections-generic-list-when-executin
public object[] OnlyBs()
Returns
- object[]
An object array containing all values.
OnlyBs(List<AB>)
Extracts only the values (B part) from a list of AB pairs.
public static List<object> OnlyBs(List<AB> list)
Parameters
Returns
OnlyBsList()
Returns a list containing only the values (B part) from all AB pairs.
public List<object> OnlyBsList()
Returns
ToString()
Returns a string representation of all elements in comma-separated format.
public override string ToString()
Returns
- string
A string containing all elements separated by commas.