ConfigEx 2.1.0

I’d like to introduce a library for accessing app settings in the App.config and Web.config. Unlike standard ConfigurationManager, ConfigEx additionally allows reading configs of other assemblies used in the project. Moreover, it is strongly typed, has a mechanism of settings overriding and allows apply automatic conversion of values.

Continue reading ConfigEx 2.1.0

Filling model properties using Reflection

In this topic I’m going to show how to fill object properties using reflection no matter what types they are.

Let’s take some example. Say, we have some input CSV file with header and values:

HTC;Titan;Black;Windows Phone 7.5;20111007;10.0
Samsung;Galaxy S3;White;Android 4.0.4;20120529;9.8
Nokia; Lumia 920;Yellow;Windows Phone 8;20121102;9.9

We are going to operate with these values in our application. First of all we need to parse each line. It can be done manually or using some existing library. Parsed values we can store in a dictionary, for instance. Anyway, it’s not a question of the topic.

Continue reading Filling model properties using Reflection