Perhaps this may work for you
public interface IBase
{
public int Id { get; }
}
public class SomeClass
{
public static void CompareValueTexture<T>(IQueryable<T> sender)
{
foreach (var item in sender)
{
if (item is IBase itemData)
{
Debug.WriteLine(itemData.Id);
}
}
}
public static void CompareValueTexture<T>(List<T> sender)
{
foreach (var item in sender)
{
if (item is IBase itemData)
{
Debug.WriteLine(itemData.Id);
}
}
}
}