public CompoundPrimitive(CompoundPrimitive compoundPrimitive) : base(compoundPrimitive) { primitives = new List <Primitive>(compoundPrimitive.primitives.Count); foreach (Primitive primitive in compoundPrimitive.primitives) { Primitive p = Activator.CreateInstance(primitive.GetType(), primitive) as Primitive; primitives.Add(p); } }
public CompoundPrimitive(CompoundPrimitive compoundPrimitive) : base(compoundPrimitive) { primitives = new List<Primitive>(compoundPrimitive.primitives.Count); foreach (Primitive primitive in compoundPrimitive.primitives) { Primitive p = Activator.CreateInstance(primitive.GetType(), primitive) as Primitive; primitives.Add(p); } }