D
DeveloperX
Hi, I accidently posted the following to
microsoft.public.dotnet.csharp.general a few days ago when it should of
ended up here, so apologies for the cross post. Any advice is as always
appreciated.
--original message--
Hi,
I've just been reading
http://www.codeproject.com/csharp/data_binding_reflection.asp and I
appreciate what the author is doing, but it raises a couple of
questions.
With the example someone posted in a comment at the bottom, where the
attribute defines whether the property is a currency for example,
surely it would be better to define that information in some external
schema to allow it to be updated with a simple database change or xml
file edit?
The bit of information I'm missing is why would I use a read only
attribute that will require a code change to alter it when I can
achieve the same and make it configurable externally?
I've tried to think of some examples where attributes make sense in
their examples, but each time I come back to externalising that config
info.
Is it just a matter of style? If anyone uses attributes in this manner,
I'd love to hear your experiences.
Thank you
Ian
microsoft.public.dotnet.csharp.general a few days ago when it should of
ended up here, so apologies for the cross post. Any advice is as always
appreciated.
--original message--
Hi,
I've just been reading
http://www.codeproject.com/csharp/data_binding_reflection.asp and I
appreciate what the author is doing, but it raises a couple of
questions.
With the example someone posted in a comment at the bottom, where the
attribute defines whether the property is a currency for example,
surely it would be better to define that information in some external
schema to allow it to be updated with a simple database change or xml
file edit?
The bit of information I'm missing is why would I use a read only
attribute that will require a code change to alter it when I can
achieve the same and make it configurable externally?
I've tried to think of some examples where attributes make sense in
their examples, but each time I come back to externalising that config
info.
Is it just a matter of style? If anyone uses attributes in this manner,
I'd love to hear your experiences.
Thank you
Ian
