public ObjectWithDynamicAttributes copy() {
ObjectWithDynamicAttributes copy = null;
try {
copy = (ObjectWithDynamicAttributes)this.GetType().GetConstructor(System.Type.EmptyTypes).Invoke(null);
foreach (object val in attributes)
{
copy.attributes.Add(val, attributes[val]);
}
} catch (Exception ex) {
Debug.WriteLine(ex.ToString());
}
return copy;
}