Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to add a list of class objects under the same class as return method'

for example say we have a class called player.

now under the same class we want to create a method like this:
static List<player> prefil()
this method will return a list of class object

What I have tried:

I could not understand how to solve the problem
Posted
Updated 24-Jul-18 20:08pm
v2

Read the instructions. They are pretty clear, so if you don't understand them, you need to re-read your course notes and then the instructions again until you do.

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!
 
Share this answer
 
Have a read of the documentation on classes that should get you started.

Classes (C# Programming Guide) | Microsoft Docs[^]
 
Share this answer
 

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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