Back to list
Views:   5.1K
Replies:  0

.NET 2.0. Decorate a property with attribute for a class that's in the same assembly

Hello folks,

I've a class with several properties, of which some are mandatory.
The consuming class will take action depending on whether properties are mandatory.

If property 'InvoiceNumber' is mandatory then
  'do stuff

It seems that doing this in .NET 2.0, this is fairly convoluted. See this article:

It involves loading an assembly and then use reflection.  This doesn't make sense, i.e. loading an assembly, if the class that I'm examining resides in the same assembly!

Any advice appreciated.


Chr Yoker, Oct 26, 2010
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.