A quick working example of Covariance and Contravariance in generics for a reference of when in and out C# keywords can be used.
Continue reading Covariance and Contravariance in generics exampleTag: c#
C# enum in Knockout component
I needed to use the same C# enum in Knockout component view model to keep them both consistent. Also, this means less code duplication and no hardcoded values. The Knockout’s view model was in a component, therefore I decided to pass enum as a parameter from Razor view.
Continue reading C# enum in Knockout component