In C # code, I found this tool.
I tried to find out what kind of meaning and meaning, but only an explanation of the keyword.
So what are these in and out keywords?
public delegate Tb Reader<in Ta, out Tb>( Ta a );
The parameter inindicates that the type parameter is contravariant - you can pass in a class that inherits Ta.
in
The parameter outindicates that the parameter is covariant -> you can use more derived types.
out
See here for in modifer and here for out modifier.
They make it possible to make an example below.
Reader<string,object> first = someString => return someObject; Reader<object,string> second= someObject => return someString; first=second;
Source: https://habr.com/ru/post/1684181/More articles:Encryption in MySQL, decryption in C # - c #how to read file outside codeigniter folder - phpAs a class that does not initialize all its members in its constructor for initialization in C ++ 11 - c ++How to use the synchronization function to slowly accelerate the zoom function using SpriteKit - iosimplement an implementation in one multifunctional interface class - many CRTP classes? - c ++How does this example from shrinking documentation work? - javascriptUnknown migration for "djcelery: 0001_initial" when porting a Django application using south - djangoGetting java.lang.NoSuchMethodException: the 'xx' property does not have a setter method in the 'class xx' class when using the PropertyUtils.setSimpleProperty function - javaHow to set values ββwith different time intervals? - sqlChanging the skin of players using NMS in Minecraft (Bukkit / Spigot) - javaAll Articles