Can (should) objects be dynamically named and referenced?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In Actionscript 2.0 there is the concept of dynamically generating and
naming objects at runtime. Dynamically named objects can be referenced and
manipulated programmatically using array-access notation.

I'm curious if a similar concept exists in Csharp.

I'm building content management apparatus for ASP.NET pages. I was thinking
it would be nice if I could take database content and generate objects out
of the results of the query. The objects could be named based on DB data:
say, the primary key.

If ADO.NET already returns data rows elements as individual objects, I'm
going to feel kind of dumb. My background is in Classic ASP/ADO. The point
of rendering the data as objects is so that I can have a clean mechanism to
allow the user to override properties for individual records: say, they want
to specify a custom title. As programmer, I could also override certain data
properties to match changing conditions: say, a changed layout.

My solution may be overbuilt given my needs. Can someone offer perspectives?

-KF
 
In Actionscript 2.0 there is the concept of dynamically generating and
naming objects at runtime. Dynamically named objects can be referenced and
manipulated programmatically using array-access notation.

Well, you could easily generate your objects and store them in a dictionary
using the name you want as a key, but objects in .NET generally do not have
names.

Could you try to explain what you are after a little more clearly, I'm
afraid I just don't understand quite what you mean.
 
Back
Top