jump to navigation

Read/Write App.Config File with .NET 2.0 4 January 2008

Posted by Ahmed Abdul Moniem in Windows Application Development.
add a comment

Introduction

Author: Alois Kraus and the full article from here

This is my first CodeProject article. I would like to show you the most important changes in the System.Configuration namespace with .NET 2.0. I have looked at my blog referrer statistics and saw about 20 hits/day by Google. Most of them were searching information on how to configure the new Enterprise Library but there are also a significant number of people that seem to seek answers to the following questions:

  • How to read/write to App.Config?
  • How to store a list of objects in a config file via the System.Configuration mechanism?

Reason enough for me to shed more light on the System.Configuration namespace. The main changes from .NET 1.0/1.1 in the System.Configuration namespace are:

  • Write to your App.Config file through the Configuration class
  • New configuration model for Windows Forms applications
  • Store complex objects including object collections in your App.Config File
  • It is possible to store Connection Strings in the App.Config file. See ConnectionSettings which enables you to store your settings on an SQL Server. The Enterprise Library for Sample SqlConfiguration exercises this by implementing a SqlConfigurationSource which can store and retrieve a ConfigurationSection

So where to start? I think first I will show you the config file and explain how you can create it programmatically in your application.

Step-By-Step Windows Application Development 12 September 2006

Posted by Ahmed Abdul Moniem in Windows Application Development.
4 comments

In this category “Windows Application Development” we will be concerned ONLY in developing some windows applications using C# 2005 mainly.

This post is the start of this category and I hope to hear from you some ideas to windows applications to develop here step-by-step in this section and all the source code will be supplied to my blog visitors for free and may be it will be licensed using GPL license.

So, I am waiting for your ideas and I hope it will effective and creative ….

Note:
All the applications which will be developed will walk on these guide lines step-by-step:
1- Project Life Cycle
2-N-Tier Application Development with Microsoft.NET