|
Enhanced C#
Loyc library documentation
|
Helper class for treating a collection of a derived type as a collection of a base type or interface. More...
Helper class for treating a collection of a derived type as a collection of a base type or interface.
LCExt.UpCast{T, TResult}(IReadOnlyCollection{T})
This class is rarely needed because generic variance allows casting IListSource{DerivedClass} to IListSource{BaseClass}. However, it is still useful to convert a list of structs from IListSource{Struct} to IListSource{IInterface}.
| T | : | TOut |
Properties | |
| override int | Count [get] |
Public Member Functions | |
| UpCastListSource (IListSource< T > original) | |
| override TOut | TryGet (int index, out bool fail) |
1.8.7