Test Foro de elhacker.net SMF 2.1

Programación => Programación General => .NET (C#, VB.NET, ASP) => Mensaje iniciado por: irvincnt93 en 20 Febrero 2015, 01:48 AM

Título: qué me representa public static List<.... > .....{ }
Publicado por: irvincnt93 en 20 Febrero 2015, 01:48 AM
tengo este código que encontré en una página, pero no se que represente el List <> despues del public static.. ayuda porfaaa.

Código (csharp) [Seleccionar]
public static List<Artist> GellAllArtist()
{
string sql = @"SELECT ArtistId, Name FROM Artist ORDER BY Name ASC";
List<Artist> list = new List<Artist>();
using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["default"].ToString()))
{
conn.Open();
SqlCommand cmd = new SqlCommand(sql, conn);
SqlDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
list.Add(LoadArtist(reader));
}
}
return list;
}


Mod: Mensaje modificado, al publicar código usa etiquetas GeSHi
Título: Re: qué me representa public static List<.... > .....{ }
Publicado por: Usuario Invitado en 20 Febrero 2015, 02:22 AM
Los métodos tienen un tipo de retorno.

scope | return type | name (parameters)