 | BcfReadOnlyArrayListExtensionsSingleOrDefaultTSource Method (BcfReadOnlyArrayListTSource) |
Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence.
Namespace:
System.Linq
Assembly:
CalculationWorks.BusinessModel (in CalculationWorks.BusinessModel.dll) Version: 4.2.0
Syntaxpublic static TSource SingleOrDefault<TSource>(
this BcfReadOnlyArrayList<TSource> source
)
<ExtensionAttribute>
Public Shared Function SingleOrDefault(Of TSource) (
source As BcfReadOnlyArrayList(Of TSource)
) As TSource
Parameters
- source
- Type: CalculationWorks.BusinessModelBcfReadOnlyArrayListTSource
The source.
Type Parameters
- TSource
- The type of the elements of source.
Return Value
Type:
TSourceThe only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
BcfReadOnlyArrayListTSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also