0 Members and 1 Guest are viewing this topic.
public class ObjectIdList : List<ObjectId> { public ObjectIdList() { } public ObjectIdList(ObjectId src) { base.Add(src); } public ObjectIdList(ObjectId[] src) { base.AddRange(src); } public ObjectIdList(ObjectIdList src) { base.AddRange(src); } public ObjectIdList(ObjectIdCollection src) { foreach (ObjectId oid in src) base.Add(oid); } public static implicit operator ObjectIdList(ObjectId[] src) { return ((src != null) ? new ObjectIdList(src) : null); } public static implicit operator ObjectIdList(ObjectIdCollection src) { return ((src != null) ? new ObjectIdList(src) : null); } public static implicit operator ObjectId[](ObjectIdList src) { return ((src != null) ? src.ToArray() : null); } public static implicit operator ObjectIdCollection(ObjectIdList src) { return ((src != null) ? new ObjectIdCollection(src.ToArray()) : null); } }
Hi Daniel,Nicely done, however, I'm failing to see the use/benefit of this...can you elude as to your thoughts for creating this and possible usage scenarios? Also, how about explicit conversions as well?
Daniel;Is that Alfonso Arau in your avatar?
.............Yes sir it is, AKA "El Guapo" from The Three Amigos. But I am El Guapo too. We are both El Guapo