I have a simple way to put 2 known profiles in my profileArray list as shown below:
Parameters params = new Parameters();
params.plist = new Plist();
params.plist.profileArray = new[]
{
new Profile{name = "john", age = 12, country = "USA"},
new Profile{name = "Brad", age = 20, country = "USA"}
};
Now i have a
List<Profiles> UserProfiles
which has a bunch of profiles in it.
How do i add this list to params.plist.profileArray?
Any help is appreciated.
Thanks.
This is what is in UserProfile:
List<Profiles> UserProfiles
foreach(Profiles userProfile in UserProfiles)
{
string name = userProfile.Name;
string age = userProfile.Age;
string country = userProfile.Country;
string sex = userProfile.Sex;
string isMarried = userProfile.IsMarried;
}
plist.profileArrayreference that new array.