I was wondering if someone could guide me or tell me what the concept is called in order to learn it and / or apply it on my own.
Sometimes, using Api's I have found that some method returns a list, for example in this case.
var ListaDevuelta = api.GetLeaguePositions(RiotSharp.Misc.Region.euw, api.GetSummonerByName(RiotSharp.Misc.Region.euw, Cargar[it+2]).Id);
And this list has ... Properties? to which I agree with ListaDevuelta.First().Nombredepropiedad.
I would like to understand what first()
does, and since it is possible that a list has properties, how could I create a list that had properties, since I was interested in creating a list that saved names, emails, passwords, etc. .
I would like to know how I could create a list with these properties, for example, a list, with property name, email etc and that bring such data.
Ejemplo.First().Nombre
Thank you very much for all your help.
Edit:
private class Idunno
{
public List<string> nombre;
}
private void Form1_Load(object sender, EventArgs e)
{
List<Idunno> Lista = new List<Idunno>();
Idunno objeto = new Idunno();
string[] prueba = { "Raquel", "sofia", "Juan", "jorge" };
for(int it = 0; it < prueba.Count(); it++)
{
objeto.nombre.Add(prueba[it]);
}
Lista.Add(objeto);
Console.WriteLine(Lista.First().nombre);
}
How could you fill that object with the names of the array, and not just with a single data?