Monday, 05 May 2008

Validators in Custom Configuration Sections

Today I was extending/cleaning/rewriting my Exception Handling library to take advantage of the new .NET 3.5 features.. It proved to be quite fun, so I started making it more useful, and easy to use.

At some point I decided to change the way I stored all the settings in the configuration file. Before I had my own configuration section, that used the standard AppSettingsSection class. Simple and fast. But it didn't look clean. All the settings were mixed up together etc etc..

So I created a clean new sectionGroup with several sections, collections and so on. When I reached the notification e-mail field, I thought that having a validator would be... A lot better :)

Strangely enough, when I added the RegexStringValidator, the application crashed, telling me my e-mail was not valid against the regular expression..

(Read More)

The beginning

I'm a C# Developer in London.

I don't consider myself great, and far from perfect, but I had my share of experience in my life, and I have a drive for testing, research, digging up problems and solutions.

That's one of my abilities I dearly like, and one that helped me more than once in my life (especially in programming)

I'd like to sometimes share with everyone some things that I think people would find useful.. And if one of my solutions will help someone, I'd be more than pleased!

So let's start yet another debugging session!

Pages: 1 2 3