Hi
I have a bunch of custom entities that all inherit from a "baseEntity" class.
What I want to do is, in another class, create a method that takes a parameter that can be any type as long as that type inherits from base entity.
Is this possible?
Should I use generics?
public class BaseEntity
{
public Nullable<int> UniqueId { get; set; }
public Enums.eSaveAction SaveAction { get; set; }
}
public class FilesForTab : BaseEntity
{
public int Related_Id { get; set; }
public string FileName { get; set; }
public Nullable<int> FileSize { get; set; }
}
(other class)
public void DoSomething(List<BaseEntity> collection, IEnumerable<BaseEntity> rows)
{....}
thanks in advance