The code below is used to initialise a store in some C# code I am looking at. However I do not understand the => syntax in this context.
Any ideas?
protected new ServiceRepositoryStore<T> Store => (ServiceRepositoryStore<T>) base.Store;
The code below is used to initialise a store in some C# code I am looking at. However I do not understand the => syntax in this context.
Any ideas?
protected new ServiceRepositoryStore<T> Store => (ServiceRepositoryStore<T>) base.Store;
That is an example of an expression bodied read-only property:
https://msdn.microsoft.com/en-us/magazine/dn802602.aspx
It's a C# 6.0 feature and is the equivalent of:
protected new ServiceRepositoryStore<T> Store
{
get
{
return (ServiceRepositoryStore<T>) base.Store;
}
}