I'm curious how to check if given type is closed version of open type. For instance
public bool IsGenericList(Type source)
{
return (source.IsGenericType &&
/*here goes the manipulation on source type*/ == typeof(List<>));
}
What are the Similarities Between Open Circulatory System and Closed Circulatory System? Both open circulatory system and closed circulatory system transport oxygen and nutrients to the organs and removes waste products. Also, they both have a heart and vessels.
In a closed circulatory system, blood is contained inside blood vessels, circulating unidirectionally (in one direction) from the heart around the systemic circulatory route, then returning to the heart again.
In what way is a closed circulatory system more efficient than an open circulatory system? a. A closed circulatory system is a closed loop and therefore does not require a heart for pumping blood.
The closed circulatory system has more advantages over the open circulatory system. 1. The blood transfers faster in the closed system, thus oxygen, nutritients, and wastes transport fast also.
Try Type.GetGenericTypeDefinition
:
public bool IsGenericList(Type source)
{
return source.IsGenericType &&
source.GetGenericTypeDefinition() == typeof(List<>);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With