Click here to Skip to main content
15,916,835 members
Please Sign up or sign in to vote.
4.69/5 (3 votes)
See more:
I want to do this.


C#
  List <object> GetAllFoo()
        {
List <Customer> abc = new List <Customer>();
            abc  = _dataObject.SelectAllFoo();
return abc as List<object>;
            
       }


Ho can i will be able to return a List<object> instead of List<foo>?


Thanks in advance for help
Posted

instead list<object> try list<customer> and return the same because it is already known object
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900