Create a class that holds the information as List<string>, List<int> and List<string>. However a much better approach is to hold all the information for a single entity was a single class and store a list of those items:
class Person
{
public string Name { get; set; }
public int Age { get; set; }
public bool Male { get; set; }
}
Now store instances of that type in a list:
var list = new List<Person> {
new Person { Name = "James", Age = 18, Male = true },
new Person { Name = "Nicolas", Age = 52, Male = true },
new Person { Name = "Susan", Age = 37, Male = false }
};
This way you don´t need to "synchronize" all three lists, you have only one list instead.
If you really must use the approach you described define a class holding three different lists:
class Persons
{
public List<string> Names { get; set; }
public List<int> Ages { get; set; }
public List<bool> Male { get; set; }
}
Now you can create your persons as follows:
var persons = new Persons {
Names = new List<string> { "James", "Nicolas", "Susan"},
Ages = new List<int> { 17, 53, 37 },
Male = new List<bool> { true, true, false }
}
However this is quite difficult as every time you delete a name for example you´d also have to delete the appropriate age- and male-element also. Something like this:
persons.Names.RemoveAt(1);
persons.Ages.RemoveAt(1);
persons.Male.RemoveAt(1);
List<string>,List<int>andList<string>.