Click here to Skip to main content
15,886,422 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have class 'Student' , I want to create multiple instance of class 'Student' and want to assign instance name as S1,S2,S3..etc(1,2,3 will be id of student , so instance name will be as S+StudentID) at runtime. How can i do this?

Thanks.
Posted

I would use an array of objects (or a List). Almost the same effect without too much effort.
 
Share this answer
 
got my answer here ,
 
Share this answer
 
Comments
Jibesh 19-Dec-12 6:44am    
Yes. thats what CPallini provided as solution. If that helps you can accept his 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