I have a three class which is having following properties
Class A { public int CustID { get; set; } public string Name{ get; set; } } Class B {
dynamic
should fix this issue, don't cast or go around in circles..
List products = new List(); foreach (dynamic prod in products) { prod.ShopCategoryID = 1 ; // give you access to props }