Is it possible to achieve the following code? I know it doesn't work, but I'm wondering if there is a workaround?
Type k = typeof(double);
List<k> lst = new List<k>();
Is it possible to achieve the following code? I know it doesn't work, but I'm wondering if there is a workaround?
Type k = typeof(double);
List<k> lst = new List<k>();
Try this:
Yes, there is:
A cleaner way might be to use a generic method. Do something like this: