DataStoreExtensions Get T Method (IDataStore) | Glimpse API Documentation |
Gets an item from store using <T> as a key. This method should be used in combination with Set<T>.
Namespace: Glimpse.Core.ExtensionsAssembly: Glimpse.Core (in Glimpse.Core.dll) Version: 1.0.1.0 (1.0.1)
Syntax
Parameters
- store
- Type: Glimpse.Core.Extensibility IDataStore
The data store instance.
Type Parameters
- T
- The type of item to retrieve and the key when used in combination with Set<T>.
Return Value
An item of type T, null or an InvalidCastException is thrown depending on the type of store. Call Contains<T> first to ensure results.Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IDataStore. 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).Exceptions
Exception | Condition |
---|---|
System InvalidCastException | May throw an invalid cast exception if the IDataStore item and type do not match. |
See Also