I still haven't finished modifying my code yet. I didn't get to work on it at all today.
Friend means "I can access this from anywhere inside the same assembly (.dll)"
Public means "I can access this from other assemblies."
Private means "I can only be accessed from within code in this level of code (Class, or Method depending on where it is declared)"
So if you declare things as Public, other assemblies could potentially call into your code. You should only declare things as Public when AutoCAD requires it (like with Command Methods), or when you want to access it from another assembly. Admittedly, that might be a low risk for you, as it is for me, and also admittedly, sometimes it is the desired behavior, like with my Cadtools .dll which I reference into all of my other projects. I just thought I should mention it, in this case in particular, because it would seem that you should not provide other programmers with the means to Explode your custom objects.
"Shared" is a whole different animal altogether, and it is a little difficult to explain. In the simplest terms I can come up with, the opposite of "Shared", ie. anything NOT declared as Shared in VB, is an "Instance" variable (or object), meaning each instance of the class would have it's own instance of the variable. If the variable or Object is declared as Shared, then there is only one instance of the variable that all instances of the class use. Overrules should be Instantiated for each drawing that they apply to, so IMHO, you should not have a Shared variable for your Overrule.
I don't think I explained that very well, but I hope it helps. When I finally finish putting my example together, it might help a little more. I think now, after writing this, I will expand my example to be a complete project, instead of just a few methods that belong in a Class.
Right now, I've got to hit the sack.
You could've been a teacher. It was good explanation. I understood it. I google it and could not understand those terms. ( Like Modifiers & initialized & .... )
but your explanation was clear.
Access a broad range of knowledge to help get the most out of your products and services.