using System.Collections;
using System.Collections.Generic;
public interface IHasParts<TCollectionType> where TCollectionType : ICollection
TCollectionType Parts { get; set; }
public class Car : IHasParts<List<CarPart>>
public List<CarPart> Parts { get; set; }
public static void Main()
Parts = new List<CarPart>() {
int partsCount = ((IHasParts<ICollection>)o).Parts.Count;