Is it possible to create objects during development without the need to define hard-coded classes, and then fill properties with primitives or even strongly typed data types?
This may seem confusing, so I will try to give you a use case.
Use Case:
You have a configuration file XMLthat may contain configuration values for connecting to various systems in the application SOA. In C #, the file is XMLread, but for each system the configuration properties are different (for example: SQL may have a connection string, while SharePoint may need a username + password + domain + url, while the smtp server needs a username + password + port + url)
So, instead of creating static classes as follows
public class SharePointConfigurationor public class SQLConfiguration, then each class has custom properties (this is cumbersome)
or
using the 1990 method, ArrayListor some named collection
Is there a more preferable way to achieve this? Taking advantage of the new language features that intellisense development time can still offer, which will simplify code work and be less error prone.
I assume I'm looking for some kind of multi-purpose .net 4. resource. Thanks
source
share