dynamic properties

  • Thread starter Thread starter Leon Jollans
  • Start date Start date
L

Leon Jollans

Hi all
Is there a way to catch all property requests and resolve at runtime
internally within the class?

I ask because I'm looking into creating a dynamic CrystalReport web service,
and all the sections are explicitly named properties in the generated asmx
rather than being indexed.

Thanks
 
It sounds like you need to explicitly code the access to dynamic properties
instead of letting VS.NET do it for you behind the scenes. Then, in the
"Get" code, read your property values from the web.config file yourself.
 
I'm not sure I follow - what I'm wondering is if (via reflection or some
such) I could write code like:

public object aValue{
get{
return someIndexer[aValue];
}
}

where aValue is undetermined until the call is made. I wouldn't expect this
(if at all possible) to be simple, and certainly not as syntactically nice
as the theoretical example above, but if mechanisms exist to allow this to
happen, I'd like to find out how - it could be immensely useful.

Leon
 
Back
Top