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
Shoaib Ahmed
NA
189
5.3k
How to create a List of object into a user defined class
Jan 8 2019 3:10 AM
My first class :
public class Person
{
public string name{get; set;}
public int Id{get; set;}
public list<Company> companies {get; set;}
}
I want to list of companies the person been.
Company Class:
public class Company
{
public string name{get; set;}
public string address{get; set; }
}
In Controller I am assigning the list:
List<Person> personList = new List<Person>();
I am returning this personlist to the view.
How can I create list of user defined type within a user defined class and How can I show A person multiple companies?
Reply
Answers (
5
)
how to display image in Excel using open xml in c#
Textbox Content change