Class StringOrArray<T>
A polymorphic type that can hold either a single string or an array of T.
Inheritance
StringOrArray<T>
Assembly: Glitch9.IO.dll
Syntax
public class StringOrArray<T> : INullable
Type Parameters
Constructors
|
Edit this page
View Source
StringOrArray(string)
Declaration
public StringOrArray(string stringValue)
Parameters
| Type |
Name |
Description |
| string |
stringValue |
|
|
Edit this page
View Source
StringOrArray(T[])
Declaration
public StringOrArray(T[] arrayValue)
Parameters
| Type |
Name |
Description |
| T[] |
arrayValue |
|
Properties
|
Edit this page
View Source
Array
Declaration
public T[] Array { get; }
Property Value
|
Edit this page
View Source
Count
Declaration
public int Count { get; }
Property Value
|
Edit this page
View Source
HasValue
Gets whether this object has a value.
Declaration
public bool HasValue { get; }
Property Value
|
Edit this page
View Source
IsArray
Declaration
public bool IsArray { get; }
Property Value
|
Edit this page
View Source
IsReadOnly
Declaration
public bool IsReadOnly { get; }
Property Value
|
Edit this page
View Source
IsString
Declaration
public bool IsString { get; }
Property Value
|
Edit this page
View Source
this[int]
Declaration
public T this[int index] { get; set; }
Parameters
| Type |
Name |
Description |
| int |
index |
|
Property Value
|
Edit this page
View Source
Length
Declaration
public int Length { get; }
Property Value
|
Edit this page
View Source
String
Declaration
public string String { get; }
Property Value
Methods
|
Edit this page
View Source
AddRange(IEnumerable<T>)
Declaration
public void AddRange(IEnumerable<T> items)
Parameters
|
Edit this page
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
|
Edit this page
View Source
implicit operator StringOrArray<T>(string)
Declaration
public static implicit operator StringOrArray<T>(string stringValue)
Parameters
| Type |
Name |
Description |
| string |
stringValue |
|
Returns
|
Edit this page
View Source
implicit operator StringOrArray<T>(T[])
Declaration
public static implicit operator StringOrArray<T>(T[] arrayValue)
Parameters
| Type |
Name |
Description |
| T[] |
arrayValue |
|
Returns
Implements
Extension Methods