 | PropertyGetValueT Method |
Returns exactly one value for a key. If there is no value for the
key or the value is not of type T, defaultValue is returned.
Namespace: NetEti.ApplicationEnvironmentAssembly: NetEti.PropertyAccess (in NetEti.PropertyAccess.dll) Version: 1.0.0+15e05d93a5b6eca3f576235deaede6f5dab57939
Syntaxpublic T GetValue<T>(
string key,
T defaultValue
)
Public Function GetValue(Of T) (
key As String,
defaultValue As T
) As T
public:
generic<type name T>
T GetValue(
String^ key,
T defaultValue
)
member GetValue :
key : string *
defaultValue : 'T -> 'T
Parameters
- key String
- The access key (string)
- defaultValue T
- The default result of type T
Type parameters
- T
- The desired return type
Return value
TValue cast to the key in the return type
Exceptions
See also