I need to have a generic list type Object as a parameter ,which whenever accepts a different type of list object,pass that object in the function as converted list type object which was passed.
Is there any solution for this ,Please do help me
I need to have a generic list type Object as a parameter ,which whenever
Share
Not sure to fully understand, but if you want your function to take a list of any object types as parameter, then you could use a generic method:
For C#:
Also do note that you can choose another interface/object than
IList, depending on your needs (ICollection,IEnumerable,List…).