Click here to Skip to main content
15,896,369 members
Articles / Web Development / ASP.NET

Strongly Typed Custom Configuration Sections using XML Serialization

Rate me:
Please Sign up or sign in to vote.
4.33/5 (5 votes)
6 Jan 2008CPOL3 min read 63.1K   712   28  
This article demonstrates a simple approach to get strongly typed configuration objects to use in your code using XML serialization
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Citrus.Configuration", "Citrus.Configuration\Citrus.Configuration.csproj", "{2931147A-AE6C-41EA-880F-3351AB3E1364}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Citrus.Configuration.Demo", "Citrus.Configuration.Demo\Citrus.Configuration.Demo.csproj", "{F44A4C86-F37B-4CB3-91F9-57E81A74846F}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{2931147A-AE6C-41EA-880F-3351AB3E1364}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{2931147A-AE6C-41EA-880F-3351AB3E1364}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{2931147A-AE6C-41EA-880F-3351AB3E1364}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{2931147A-AE6C-41EA-880F-3351AB3E1364}.Release|Any CPU.Build.0 = Release|Any CPU
		{F44A4C86-F37B-4CB3-91F9-57E81A74846F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{F44A4C86-F37B-4CB3-91F9-57E81A74846F}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{F44A4C86-F37B-4CB3-91F9-57E81A74846F}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{F44A4C86-F37B-4CB3-91F9-57E81A74846F}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
United Kingdom United Kingdom
I work as a Technology Lead for an IT services company based in India.

Passions include programming methodologies, compiler theory, cartooning and calligraphy.

Comments and Discussions