using System.Collections.Generic;
public string Brand { get; set; }
public decimal Price { get; set; }
static class ExtensionMethods
static public void CopyTo(this object source, object destination)
var destinationType = destination.GetType();
foreach (var s in source.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance))
var d = destinationType.GetProperty(s.Name);
if (!d.CanWrite) continue;
if (!d.PropertyType.IsAssignableFrom(s.PropertyType)) continue;
d.SetValue(destination, s.GetValue(source));
public static void Main()
List<Car> cars = new List<Car> { new Car(), new Car() };
var a = new { Brand = "Something", Price = 123M};
Console.WriteLine("Brand: {0}", cars[0].Brand);
Console.WriteLine("Price: {0}", cars[0].Price);