That article doesn't talk about "static" and "dynamic", and I'm not real sure what you mean. So I'm going to guess you mean the difference between knowing the class at compile time and knowing it at run time.
In the compile time option we specified ArrayList. The compiler has to have access to the ArrayList class to compile.
In the runtime example, we get the class name from a String. It might be ArrayList or it might be some new List implementation we've never heard of. The code compiles without knowing the exact class because we tell it we're pretty sure it's a List implementation when we do the casting.
We use the runtime trick (which I don't mind calling dynamic, though I don't think that's a dictionary definition) when we don't know the actual class at runtime. That lets us maybe change classes through configuration or lets users introduce new classes that we never know about by passing a new string. We never have to touch this code.
Does that answer the right question? [ September 25, 2007: Message edited by: Stan James ]
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com