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
priya gopi
NA
2
2.3k
Decorator pattern
Jul 19 2012 8:29 AM
Hi,
I have a class like this,
public class OrgChartBasicInfo
{
public int UserId { get; set; }
public int ManagerUserId { get; set; }
public string FullName { get; set; }
public string CompanyName { get; set; }
public string CurrentPosition { get; set; }
}
Am adding these values to a collection like this
private static List<OrgChartBasicInfo> GetEmployees()
{
List<OrgChartBasicInfo> Employees = new List<OrgChartBasicInfo>();
OrgChartBasicInfo ChildInfo = new OrgChartBasicInfo();
ChildInfo.UserId = 1;
ChildInfo.ManagerUserId = 0;
ChildInfo.FullName = "Employee1";
ChildInfo.CompanyName = "Abc Company";
ChildInfo.CurrentPosition = "Reg. Director of Sales ";
Employees.Add(ChildInfo);
return Employees;
}
I want to add one more property to my collection without modifying my class.
I want to add
Collapsed = 1;
in to my collection without editing my class OrgChartBasicInfo.
How can i do this?
Any help?
Thanks,
Priya
Reply
Answers (
1
)
Convert pdf document to word document
c# windows programming