Method GetValue
- Namespace
- PaintDotNet.FileTypes
- Assembly
- PaintDotNet.FileTypes.dll
GetValue<T>(IReadOnlyFileTypePropertyBag, string, in T)
Retrieves a value from the property bag and parses it using the specified type. If the key does not exist, or if the parsing fails, then the given default value is returned instead.
public static T GetValue<T>(this IReadOnlyFileTypePropertyBag propertyBag, string key, in T defaultValue) where T : IParsable<T>
Parameters
propertyBagIReadOnlyFileTypePropertyBagkeystringdefaultValueT
Returns
- T
Type Parameters
T