3
I need to receive an Object List by parameter Generic and manipulate, although researching did not understand right how to do.
Example:
public class Funcionario
{
public long Id {get; set;}
public string Nome {get; set;}
public DateTime DataContrato {get; set;}
}
public class Professor
{
public long Id {get; set;}
public string Nome {get; set;}
public bool IsAtivo {get; set;}
}
public void Reload(List<objeto> GridListaObjeto, int qtde)
{
foreach (var obj in GridListaObjeto)
{
string sId = obj.Id;
string sNome = obj.Nome;
}
}
Instantiate in main a generic type list and initialize it within the method?
– Maurício Z.B