| FactCollectionGetOrDefaultT Method (String, FuncT) |
Returns the value of the fact with the given name or a specified default value is the given fact cannot be found.
Namespace: Dynamicweb.Content.Social.MetricsAssembly: Dynamicweb (in Dynamicweb.dll) Version: 9.6.0
Syntax public T GetOrDefault<T>(
string name,
Func<T> defaultValueFactory
)
Public Function GetOrDefault(Of T) (
name As String,
defaultValueFactory As Func(Of T)
) As T
Parameters
- name
- Type: SystemString
Fact name. - defaultValueFactory
- Type: SystemFuncT
Default value factory.
Type Parameters
- T
- Value type.
Return Value
Type:
TFact value.
Remarks See Also