Originally posted by maha shivaji:
Jeff-
Is this the only way?. Can't use reflection or someother technique to cast the result. I also dont want to type cast each and every item in the List. Thanks,
Sounds like you need a for loop here. You can create a new List<T> and copy elements from the old List to the new one. Although, I suspect this will cause a lot more of these "unsafe operation" warnings.
Do you have access to this legacy library? And how much will it take to make the necessary changes to use generics properly? This might be something that is worth looking into.
Layne