Suppose I set the Width of a WebContainer to 500 in the IDE. Is there a way, in code, to get that value without first instantiating that class? The way I’ve been doing it thus far is like this:
Dim x As New MyWebContainer
[ do something with MyWebContainer.Width here ]
x = Nil
no… its like what color is the car that Ford will manufacture tommorow
If you don’t instantiate it, it does not exist, if it does not exist, you can extract no information from it
Well, that’s what I figured. I just thought there might be a trick at pulling it out of the code itself instead of out of an object. Like asking what the production specs say will be the color of this car if I manufacture it tomorrow. Thanks Dave.
But you already know what is in the code, there is no magic involved! If you want to know what color the factory is using, you’d ask them rather than break in and stell their blue prints. Think about designing a factory class that can provide you information the objects it can create.
Put the value in a constant and use the constant in your code
Then you can access the that constant without having to create an instance
Otherwise you need an instance
[quote=309961:@Norman Palardy]Put the value in a constant and use the constant in your code
Then you can access the that constant without having to create an instance[/quote]
That’s what I was considering doing just before posting my original post.