I know it has been asked several times but I’m having very hard time understanding the <T> concept.
I’m working on a custom GridView and I want to set the Cell.Value property upon CellUpdate event. the problem is that in most cases I will have to take a string from the cell’s control input while I have no idea how to ‘dynamically’ convert (in elegant way) this String to the original object which in this case is represented in _Value as object.
Hope any of this make some sense, thank you.
Generic (
<T>) and Dynamic are two opposite concepts. Generics should be known at compile-time and dynamic are resolved at runtime. So if you know the type (<T>) dynamically only at runtime you cannot invoke a generic method unless you use reflection.Depending on your specific requirements and code you are dealing with there might be different solutions.