TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
George Loveless
NA
13
0
how to use a list as a property
Mar 8 2010 12:58 AM
This little bit of code wasn't working for me. I was wondering the proper way to use a list as a property, instead of setting it as a public member.
Class Company
{
..
private list<string> employees{get; set;}
..
}
..
..// in main.
Company myCompany = new Company();
myCompany.employees.add("jim"); // doesn't work
myCompany.employees.add("sue"); // doesn't work
Thank you much.
Reply
Answers (
5
)
about classes in C#
Binding Source for database connectivity in vb.net