PeterO.Util
## PeterO.Util
public static class Util
Not documented yet.
Member Summary
[AddIfMissing<T>(this System.Collections.Generic.IList<T>, T)](#AddIfMissing_T_this_System_Collections_Generic_IList_T_T)
- Not documented yet.[AddIfMissing<TKey, TValue>(this System.Collections.Generic.IDictionary<TKey, TValue>, TKey, TValue)](#AddIfMissing_TKey_TValue_this_System_Collections_Generic_IDictionary_TKey_TValue_TKey_TValue)
- Adds if missing.[AddOverwrite<TKey, TValue>(this System.Collections.Generic.IDictionary<TKey, TValue>, TKey, TValue)](#AddOverwrite_TKey_TValue_this_System_Collections_Generic_IDictionary_TKey_TValue_TKey_TValue)
- Adds the overwrite.[AllSame<T>(this System.Collections.Generic.IEnumerable<T>)](#AllSame_T_this_System_Collections_Generic_IEnumerable_T)
- Not documented yet.[AllSame<TContainer, TItem>(this System.Collections.Generic.IEnumerable<TContainer>, System.Func<TContainer, TItem>)](#AllSame_TContainer_TItem_this_System_Collections_Generic_IEnumerable_TContainer_System_Func_TContainer_TItem)
- Not documented yet.[ArrayToString<T>(this System.Collections.Generic.IEnumerable<T>)](#ArrayToString_T_this_System_Collections_Generic_IEnumerable_T)
- Not documented yet.[CopyStream(this System.IO.Stream, int, System.IO.Stream)](#CopyStream_this_System_IO_Stream_int_System_IO_Stream)
- Copies a certain number of bytes from one stream to another.[CopyStream(this System.IO.Stream, System.IO.Stream)](#CopyStream_this_System_IO_Stream_System_IO_Stream)
- Copies all bytes from one stream to another.[CopyStructure<T>(this T) where T : new(), PeterO.IStructureT](#CopyStructure_T_this_T_where_T_new_PeterO_IStructureT)
- Not documented yet.[EachWithIndex<T>(this System.Collections.Generic.IEnumerable<T>)](#EachWithIndex_T_this_System_Collections_Generic_IEnumerable_T)
- Not documented yet.[GetSegment<T>(this System.Collections.Generic.IList<T>, int)](#GetSegment_T_this_System_Collections_Generic_IList_T_int)
- Not documented yet.[GetSegment<T>(this System.Collections.Generic.IList<T>, int, int)](#GetSegment_T_this_System_Collections_Generic_IList_T_int_int)
- Not documented yet.[HasUnique<T>(this System.Collections.Generic.IEnumerable<T>)](#HasUnique_T_this_System_Collections_Generic_IEnumerable_T)
- Not documented yet.[HasUnique<TContainer, TItem>(this System.Collections.Generic.IEnumerable<TContainer>, System.Func<TContainer, TItem>)](#HasUnique_TContainer_TItem_this_System_Collections_Generic_IEnumerable_TContainer_System_Func_TContainer_TItem)
- Not documented yet.[Implode<T>(this System.Collections.Generic.IEnumerable<T>, string)](#Implode_T_this_System_Collections_Generic_IEnumerable_T_string)
- Not documented yet.[IndexOf<T>(this System.Collections.Generic.IList<T>, System.Predicate<T>)](#IndexOf_T_this_System_Collections_Generic_IList_T_System_Predicate_T)
- Not documented yet.[IndexOf<T>(this System.Collections.Generic.IList<T>, T)](#IndexOf_T_this_System_Collections_Generic_IList_T_T)
- Not documented yet.[MakePair<TFirst, TSecond>(TFirst, TSecond)](#MakePair_TFirst_TSecond_TFirst_TSecond)
- Not documented yet.[MaxOrDefault<T>(this System.Collections.Generic.IEnumerable<T>) where T : System.IComparable<T>T](#MaxOrDefault_T_this_System_Collections_Generic_IEnumerable_T_where_T_System_IComparable_T_T)
- Not documented yet.[MinOrDefault<T>(this System.Collections.Generic.IEnumerable<T>) where T : System.IComparable<T>T](#MinOrDefault_T_this_System_Collections_Generic_IEnumerable_T_where_T_System_IComparable_T_T)
- Not documented yet.[public static readonly System.IDisposable NullDisposable;](#NullDisposable)
- An IDisposable object that does nothing when disposed.[RemoveAll<T>(this System.Collections.Generic.IList<T>, System.Predicate<T>)](#RemoveAll_T_this_System_Collections_Generic_IList_T_System_Predicate_T)
- Not documented yet.[SetIfMissing<T>(this System.Collections.Generic.IList<T>, int, System.Func<T>)](#SetIfMissing_T_this_System_Collections_Generic_IList_T_int_System_Func_T)
- Not documented yet.[SetIfMissing<T>(this System.Collections.Generic.IList<T>, int, T)](#SetIfMissing_T_this_System_Collections_Generic_IList_T_int_T)
- Not documented yet.[SetNewIfMissing<T>(this System.Collections.Generic.IList<T>, int) where T : new()T](#SetNewIfMissing_T_this_System_Collections_Generic_IList_T_int_where_T_newT)
- Not documented yet.[SetValue<T>(this System.Collections.Generic.IList<T>, int, T)](#SetValue_T_this_System_Collections_Generic_IList_T_int_T)
- Not documented yet.[StructureSize(this PeterO.IStructure)](#StructureSize_this_PeterO_IStructure)
- Not documented yet.[Sum<T>(this System.Collections.Generic.IEnumerable<T>, System.Func<T, int>)](#Sum_T_this_System_Collections_Generic_IEnumerable_T_System_Func_T_int)
- Not documented yet.[Transform<TInput, TOutput>(this System.Collections.Generic.IEnumerable<TInput>, System.Func<TInput, TOutput>)](#Transform_TInput_TOutput_this_System_Collections_Generic_IEnumerable_TInput_System_Func_TInput_TOutput)
- Not documented yet.[UpToExcluding(this int, int)](#UpToExcluding_this_int_int)
- Creates an iterator of integers starting at a minimum value and ending at one less than the maximum.[UpToIncluding(this int, int)](#UpToIncluding_this_int_int)
- Not documented yet.[ValueOrDefault<T>(this System.Collections.Generic.IList<T>, int)](#ValueOrDefault_T_this_System_Collections_Generic_IList_T_int)
- Not documented yet.
public static readonly System.IDisposable NullDisposable;
An IDisposable object that does nothing when disposed.
public static void AddIfMissing<T>( this System.Collections.Generic.IList<T> dict, T value);
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing IList and can be called as follows: dict.AddIfMissing<T>(value)
. If the object’s class already has a AddIfMissing
In the.NET implementation, this method is implemented as an extension method to any object implementing IList and can be called as follows: dict.AddIfMissing<T>(value)
. If the object’s class already has a AddIfMissing<T>
method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
dict: The parameter dict is a.Collections.Generic.IList{``0} object.
-
value: The parameter value is a ``0 object.
-
<T>: Type parameter not documented yet.
Exceptions:
- System.ArgumentNullException: The parameter dict is null.
public static void AddIfMissing<TKey, TValue>( this System.Collections.Generic.IDictionary<TKey, TValue> dict, TKey key, TValue value);
Adds if missing. In the.NET implementation, this method is implemented as an extension method to any object implementing IDictionary and can be called as follows: dict.AddIfMissing<TKey, TValue>(key,
value)
. If the object’s class already has a AddIfMissing<TKey, TValue>
method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
dict: The parameter dict is a.Collections.Generic.IDictionary{``0 object.
-
key: The parameter key is a ``1} object.
-
value: The parameter value is a ``0 object.
-
<TKey>: The 1st type parameter.
-
<TValue>: The 2nd type parameter.
Exceptions:
- System.ArgumentNullException: The parameter dict is null.
public static void AddOverwrite<TKey, TValue>( this System.Collections.Generic.IDictionary<TKey, TValue> dict, TKey key, TValue value);
Adds the overwrite. In the.NET implementation, this method is implemented as an extension method to any object implementing IDictionary and can be called as follows: dict.AddOverwrite<TKey, TValue>(key,
value)
. If the object’s class already has a AddOverwrite<TKey, TValue>
method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
dict: The parameter dict is a.Collections.Generic.IDictionary{``0 object.
-
key: The parameter key is a ``1} object.
-
value: The parameter value is a ``0 object.
-
<TKey>: The 1st type parameter.
-
<TValue>: The 2nd type parameter.
Exceptions:
- System.ArgumentNullException: The parameter dict is null.
public static bool AllSame<T>( this System.Collections.Generic.IEnumerable<T> col);
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing IEnumerable and can be called as follows: col.AllSame<T>()
. If the object’s class already has a AllSame
In the.NET implementation, this method is implemented as an extension method to any object implementing IEnumerable and can be called as follows: col.AllSame<T>()
. If the object’s class already has a AllSame<T>
method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
col: The parameter col is a.Collections.Generic.IEnumerable{``0} object.
-
<T>: Any object type.
Return Value:
Either true
or false
.
Exceptions:
- System.ArgumentNullException: The parameter col is null.
public static bool AllSame<TContainer, TItem>( this System.Collections.Generic.IEnumerable<TContainer> containers, System.Func<TContainer, TItem> func);
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing IEnumerable and can be called as follows: containers.AllSame<TContainer,
TItem>(func)
. If the object’s class already has a AllSame<TContainer, TItem> method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
containers: The parameter containers is a.Collections.Generic.IEnumerable{``0} object.
-
func: The parameter func is a.Func{``0 object.
-
<TContainer>: The parameter is not documented yet.
-
<TItem>: Object type representing items stored in each container.
Return Value:
Either true
or false
.
Exceptions:
- System.ArgumentNullException: The parameter containers or func is null.
public static string ArrayToString<T>( this System.Collections.Generic.IEnumerable<T> array);
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing IEnumerable and can be called as follows: array.ArrayToString<T>()
. If the object’s class already has a ArrayToString
In the.NET implementation, this method is implemented as an extension method to any object implementing IEnumerable and can be called as follows: array.ArrayToString<T>()
. If the object’s class already has a ArrayToString<T>
method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
array: The parameter array is a.Collections.Generic.IEnumerable{``0} object.
-
<T>: Type parameter not documented yet.
Return Value:
A text string.
public static void CopyStream( this System.IO.Stream input, int length, System.IO.Stream output);
Copies a certain number of bytes from one stream to another. In the.NET implementation, this method is implemented as an extension method to any object implementing Stream and can be called as follows: input.CopyStream(length, output)
. If the object’s class already has a CopyStream method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
input: The parameter input is a Stream object.
-
length: The parameter length is a 32-bit signed integer.
-
output: The parameter output is a Stream object.
Exceptions:
- System.ArgumentNullException: The parameter input or output is null.
public static void CopyStream( this System.IO.Stream input, System.IO.Stream output);
Copies all bytes from one stream to another. In the.NET implementation, this method is implemented as an extension method to any object implementing Stream and can be called as follows: input.CopyStream(output)
. If the object’s class already has a CopyStream method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
input: The parameter input is a Stream object.
-
output: The parameter output is a Stream object.
Exceptions:
- System.ArgumentNullException: The parameter input or output is null.
public static T CopyStructure<T>( this T structure) where T : new(), PeterO.IStructureT;
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing T and can be called as follows: structure.CopyStructure<T>()
. If the object’s class already has a CopyStructure
In the.NET implementation, this method is implemented as an extension method to any object implementing T and can be called as follows: structure.CopyStructure<T>()
. If the object’s class already has a CopyStructure<T>
method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
structure: The parameter structure is a ``0 object.
-
<T>: Type parameter not documented yet.
Return Value:
A T object.
Exceptions:
- System.ArgumentNullException: The parameter structure is null.
public static System.Collections.Generic.IEnumerable<PeterO.Pair<T, int>> EachWithIndex<T>( this System.Collections.Generic.IEnumerable<T> arr);
Not documented yet.
Parameters:
-
arr: The parameter arr is a.Collections.Generic.IEnumerable{``0} object.
-
<T>: The type of each object to be enumerated.
Return Value:
When enumerated, outputs the item and its index (starting at 0), in that order.
public static PeterO.ListSegment<T> GetSegment<T>( this System.Collections.Generic.IList<T> list, int start);
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing IList and can be called as follows: list.GetSegment<T>(start)
. If the object’s class already has a GetSegment
In the.NET implementation, this method is implemented as an extension method to any object implementing IList and can be called as follows: list.GetSegment<T>(start)
. If the object’s class already has a GetSegment<T>
method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
list: The parameter list is a.Collections.Generic.IList{``0} object.
-
start: The parameter start is a 32-bit signed integer.
-
<T>: Type parameter not documented yet.
Return Value:
A ListSegment(T) object.
Exceptions:
- System.ArgumentNullException: The parameter list is null.
public static PeterO.ListSegment<T> GetSegment<T>( this System.Collections.Generic.IList<T> list, int start, int count);
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing IList and can be called as follows: list.GetSegment<T>(start, count)
. If the object’s class already has a GetSegment
In the.NET implementation, this method is implemented as an extension method to any object implementing IList and can be called as follows: list.GetSegment<T>(start, count)
. If the object’s class already has a GetSegment<T>
method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
list: The parameter list is a.Collections.Generic.IList{``0} object.
-
start: The parameter start is a 32-bit signed integer.
-
count: The parameter count is a 32-bit signed integer.
-
<T>: Any object type.
Return Value:
A ListSegment(T) object.
Exceptions:
- System.ArgumentNullException: The parameter list is null.
public static bool HasUnique<T>( this System.Collections.Generic.IEnumerable<T> col);
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing IEnumerable and can be called as follows: col.HasUnique<T>()
. If the object’s class already has a HasUnique
In the.NET implementation, this method is implemented as an extension method to any object implementing IEnumerable and can be called as follows: col.HasUnique<T>()
. If the object’s class already has a HasUnique<T>
method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
col: The parameter col is a.Collections.Generic.IEnumerable{``0} object.
-
<T>: Type parameter not documented yet.
Return Value:
Either true
or false
.
Exceptions:
- System.ArgumentNullException: The parameter col is null.
public static bool HasUnique<TContainer, TItem>( this System.Collections.Generic.IEnumerable<TContainer> containers, System.Func<TContainer, TItem> func);
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing IEnumerable and can be called as follows: containers.HasUnique<TContainer,
TItem>(func)
. If the object’s class already has a HasUnique<TContainer, TItem> method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
containers: The parameter containers is a.Collections.Generic.IEnumerable{``0} object.
-
func: The parameter func is a.Func{``0 object.
-
<TContainer>: The parameter is not documented yet.
-
<TItem>: Object type representing items stored in each container.
Return Value:
Either true
or false
.
Exceptions:
- System.ArgumentNullException: The parameter containers or func is null.
public static string Implode<T>( this System.Collections.Generic.IEnumerable<T> col, string separator);
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing IEnumerable and can be called as follows: col.Implode<T>(separator)
. If the object’s class already has a Implode
In the.NET implementation, this method is implemented as an extension method to any object implementing IEnumerable and can be called as follows: col.Implode<T>(separator)
. If the object’s class already has a Implode<T>
method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
col: The parameter col is a.Collections.Generic.IEnumerable{``0} object.
-
separator: The parameter separator is a text string.
-
<T>: Type parameter not documented yet.
Return Value:
A text string.
Exceptions:
- System.ArgumentNullException: The parameter col or separator is null.
public static int IndexOf<T>( this System.Collections.Generic.IList<T> list, System.Predicate<T> match);
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing IList and can be called as follows: list.IndexOf<T>(match)
. If the object’s class already has a IndexOf
In the.NET implementation, this method is implemented as an extension method to any object implementing IList and can be called as follows: list.IndexOf<T>(match)
. If the object’s class already has a IndexOf<T>
method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
list: The parameter list is a.Collections.Generic.IList{``0} object.
-
match: The parameter match is a.Predicate{``0} object.
-
<T>: Type parameter not documented yet.
Return Value:
A 32-bit signed integer.
Exceptions:
- System.ArgumentNullException: The parameter list or match is null.
public static int IndexOf<T>( this System.Collections.Generic.IList<T> list, T obj);
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing IList and can be called as follows: list.IndexOf<T>(obj)
. If the object’s class already has a IndexOf
In the.NET implementation, this method is implemented as an extension method to any object implementing IList and can be called as follows: list.IndexOf<T>(obj)
. If the object’s class already has a IndexOf<T>
method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
list: The parameter list is a.Collections.Generic.IList{``0} object.
-
obj: The parameter obj is a ``0 object.
-
<T>: Type parameter not documented yet.
Return Value:
A 32-bit signed integer.
Exceptions:
- System.ArgumentNullException: The parameter list is null.
public static PeterO.Pair<TFirst, TSecond> MakePair<TFirst, TSecond>( TFirst f, TSecond s);
Not documented yet.
Parameters:
-
f: The parameter f is a ``0 object.
-
s: The parameter s is a ``1 object.
-
<TFirst>: The parameter is not documented yet.
-
<TSecond>: Any object type.
Return Value:
A Pair(TFirst, TSecond) object.
public static T MaxOrDefault<T>( this System.Collections.Generic.IEnumerable<T> coll) where T : System.IComparable<T>T;
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing IEnumerable and can be called as follows: coll.MaxOrDefault<T>()
. If the object’s class already has a MaxOrDefault
In the.NET implementation, this method is implemented as an extension method to any object implementing IEnumerable and can be called as follows: coll.MaxOrDefault<T>()
. If the object’s class already has a MaxOrDefault<T>
method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
coll: The parameter coll is a.Collections.Generic.IEnumerable{``0} object.
-
<T>: Any object type that implements IComparable
.
Return Value:
A T object.
Exceptions:
- System.ArgumentNullException: The parameter coll is null.
public static T MinOrDefault<T>( this System.Collections.Generic.IEnumerable<T> coll) where T : System.IComparable<T>T;
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing IEnumerable and can be called as follows: coll.MinOrDefault<T>()
. If the object’s class already has a MinOrDefault
In the.NET implementation, this method is implemented as an extension method to any object implementing IEnumerable and can be called as follows: coll.MinOrDefault<T>()
. If the object’s class already has a MinOrDefault<T>
method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
coll: The parameter coll is a.Collections.Generic.IEnumerable{``0} object.
-
<T>: Type parameter not documented yet.
Return Value:
A T object.
Exceptions:
- System.ArgumentNullException: The parameter coll is null.
public static int RemoveAll<T>( this System.Collections.Generic.IList<T> list, System.Predicate<T> match);
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing IList and can be called as follows: list.RemoveAll<T>(match)
. If the object’s class already has a RemoveAll
In the.NET implementation, this method is implemented as an extension method to any object implementing IList and can be called as follows: list.RemoveAll<T>(match)
. If the object’s class already has a RemoveAll<T>
method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
list: The parameter list is a.Collections.Generic.IList{``0} object.
-
match: The parameter match is a.Predicate{``0} object.
-
<T>: Type parameter not documented yet.
Return Value:
A 32-bit signed integer.
Exceptions:
- System.ArgumentNullException: The parameter list or match is null.
public static T SetIfMissing<T>( this System.Collections.Generic.IList<T> list, int index, System.Func<T> valuefunc);
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing IList and can be called as follows: list.SetIfMissing<T>(index, valuefunc)
. If the object’s class already has a SetIfMissing
In the.NET implementation, this method is implemented as an extension method to any object implementing IList and can be called as follows: list.SetIfMissing<T>(index, valuefunc)
. If the object’s class already has a SetIfMissing<T>
method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
list: The parameter list is a.Collections.Generic.IList{``0} object.
-
index: The parameter index is a 32-bit signed integer.
-
valuefunc: The parameter valuefunc is a.Func{``0} object.
-
<T>: Type parameter not documented yet.
Return Value:
A T object.
Exceptions:
- System.ArgumentNullException: The parameter list is null.
public static T SetIfMissing<T>( this System.Collections.Generic.IList<T> list, int index, T value);
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing IList and can be called as follows: list.SetIfMissing<T>(index, value)
. If the object’s class already has a SetIfMissing
In the.NET implementation, this method is implemented as an extension method to any object implementing IList and can be called as follows: list.SetIfMissing<T>(index, value)
. If the object’s class already has a SetIfMissing<T>
method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
list: The parameter list is a.Collections.Generic.IList{``0} object.
-
index: The parameter index is a 32-bit signed integer.
-
value: The parameter value is a ``0 object.
-
<T>: Type parameter not documented yet.
Return Value:
A T object.
Exceptions:
- System.ArgumentNullException: The parameter list is null.
public static T SetNewIfMissing<T>( this System.Collections.Generic.IList<T> list, int index) where T : new()T;
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing IList and can be called as follows: list.SetNewIfMissing<T>(index)
. If the object’s class already has a SetNewIfMissing
Parameters:
-
list: The parameter list is a.Collections.Generic.IList{``0} object.
-
index: The parameter index is a 32-bit signed integer.
-
<T>: Type parameter not documented yet.
Return Value:
A T object.
Exceptions:
- System.ArgumentNullException: The parameter list is null.
public static void SetValue<T>( this System.Collections.Generic.IList<T> list, int index, T value);
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing IList and can be called as follows: list.SetValue<T>(index, value)
. If the object’s class already has a SetValue
In the.NET implementation, this method is implemented as an extension method to any object implementing IList and can be called as follows: list.SetValue<T>(index, value)
. If the object’s class already has a SetValue<T>
method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
list: The parameter list is a.Collections.Generic.IList{``0} object.
-
index: The parameter index is a 32-bit signed integer.
-
value: The parameter value is a ``0 object.
-
<T>: Type parameter not documented yet.
Exceptions:
- System.ArgumentNullException: The parameter list is null.
public static int StructureSize( this PeterO.IStructure s);
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing IStructure and can be called as follows: s.StructureSize()
. If the object’s class already has a StructureSize method with the same parameters, that method takes precedence over this extension method.
In the.NET implementation, this method is implemented as an extension method to any object implementing IStructure and can be called as follows: s.StructureSize()
. If the object’s class already has a StructureSize
method with the same parameters, that method takes precedence over this extension method.
Parameters:
- s: The parameter s is a IStructure object.
Return Value:
A 32-bit signed integer.
Exceptions:
- System.ArgumentNullException: The parameter s is null.
public static int Sum<T>( this System.Collections.Generic.IEnumerable<T> containers, System.Func<T, int> func);
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing IEnumerable and can be called as follows: containers.Sum<T>(func)
. If the object’s class already has a Sum
Parameters:
-
containers: The parameter containers is a.Collections.Generic.IEnumerable{``0} object.
-
func: The parameter func is a.Func{``0 object.
-
<T>: Type parameter not documented yet.
Return Value:
A 32-bit signed integer.
public static System.Collections.Generic.IEnumerable<TOutput> Transform<TInput, TOutput>( this System.Collections.Generic.IEnumerable<TInput> containers, System.Func<TInput, TOutput> func);
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing IEnumerable and can be called as follows: containers.Transform<TInput,
TOutput>(func)
. If the object’s class already has a Transform<TInput, TOutput>
method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
containers: The parameter containers is a.Collections.Generic.IEnumerable{``0} object.
-
func: The parameter func is a.Func{``0 object.
-
<TInput>: The 1st type parameter.
-
<TOutput>: The 2nd type parameter.
Return Value:
The transform.
public static System.Collections.Generic.IEnumerable UpToExcluding( this int minValue, int maxValue);
Creates an iterator of integers starting at a minimum value and ending at one less than the maximum. In the.NET implementation, this method is implemented as an extension method to any object implementing Int32 and can be called as follows: minValue.UpToExcluding(maxValue)
. If the object’s class already has a UpToExcluding method with the same parameters, that method takes precedence over this extension method.
In the.NET implementation, this method is implemented as an extension method to any object implementing Int32 and can be called as follows: minValue.UpToExcluding(maxValue)
. If the object’s class already has a UpToExcluding
method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
minValue: The parameter minValue is a 32-bit signed integer.
-
maxValue: The parameter maxValue is a 32-bit signed integer.
Return Value:
An IEnumerable(int) object.
Exceptions:
- System.ArgumentException: The parameter minValue is greater than maxValue.
public static System.Collections.Generic.IEnumerable UpToIncluding( this int minValue, int maxValue);
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing Int32 and can be called as follows: minValue.UpToIncluding(maxValue)
. If the object’s class already has a UpToIncluding method with the same parameters, that method takes precedence over this extension method.
In the.NET implementation, this method is implemented as an extension method to any object implementing Int32 and can be called as follows: minValue.UpToIncluding(maxValue)
. If the object’s class already has a UpToIncluding
method with the same parameters, that method takes precedence over this extension method.
Parameters:
-
minValue: The parameter minValue is a 32-bit signed integer.
-
maxValue: The parameter maxValue is a 32-bit signed integer.
Return Value:
An IEnumerable(int) object.
public static T ValueOrDefault<T>( this System.Collections.Generic.IList<T> list, int index);
Not documented yet. In the.NET implementation, this method is implemented as an extension method to any object implementing IList and can be called as follows: list.ValueOrDefault<T>(index)
. If the object’s class already has a ValueOrDefault
Parameters:
-
list: The parameter list is a.Collections.Generic.IList{``0} object.
-
index: The parameter index is a 32-bit signed integer.
-
<T>: Type parameter not documented yet.
Return Value:
A T object.
Exceptions:
- System.ArgumentNullException: The parameter list is null.