title: Restrict type in a Collection inside a class module
body: <p>I have a collection inside a class module. I'd like to restrict the object type that is "addable" to this collection, i.e. collection should only ever accept objects of one given type and nothing else. </p>
  
  <p>Is there any way to enforce the type of objects added to a collection? </p>
  
  <p>From what I can tell, there is no built-in way to do this. Is the solution then to make this collection private, and build wrapper functions for the methods usually accessible for Collections, i.e. <code>Add</code>, <code>Remove</code>, <code>Item</code>, and <code>Count</code>?</p>
  
  <p>I kinda hate having to write 3 wrapper functions that add no functionality, just to be able to add some type enforcement to the <code>Add</code> method. But if that's the only way, then that's the only way.</p>