Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# VB.NET
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 18-Dec-12 22:10pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I would use an array of objects (or a List). Almost the same effect without too much effort.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

got my answer here ,
  Permalink  
Comments
jibesh at 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)



Advertise | Privacy | Mobile
Web02 | 2.8.140926.1 | Last Updated 19 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100