Click here to Skip to main content
15,886,786 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Professionals,please clarify my doubts...Here i have upload some class c# codes.How to add list to strings. I cant resolve this.
C#
public class PageListSite
{
       public List<Site> sites { get; set; }
}
public class Site
{
       public string siteName { get; set; }
       public List<Location> locations { get; set; }
}
public class Location
       public string locName { get; set; }
}
Posted
Updated 14-May-14 2:48am
v2
Comments
OriginalGriff 14-May-14 8:50am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
So what do you mean by "How to add list to strings"? Because from that snippet I have idea what you are trying to achieve, or what problem you are having.
Use the "Improve question" widget to edit your question and provide better information.

1 solution

Your question is not clear ,But you can add value to list in this manner

C#
List<site> Details=new List<site>();


Site DataObj=new Site();
DataObj.siteName="siteName";

Details.Add(DataObj);
</site></site>


Regards,

Nirav Prabtani

 
Share this 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