Click here to Skip to main content
15,879,474 members
Articles / Programming Languages / C#

Param.NET - An Automated Command-line Parameter Parser

Rate me:
Please Sign up or sign in to vote.
2.48/5 (11 votes)
19 Oct 2005CPOL3 min read 54.2K   407   24  
A library that allows developers to specify the parameters that they expect to receive from the command line and provides an easier way to access them
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
	<configSections>
		<section name="parameters" type="Params.ParamConfigurationSectionHandler,Param.NET" allowLocation="false"/>
	</configSections>
	
	<parameters autoGenerateParams="false" defaultIsOptional="false" shortControlString="-" longControlString="--" attribChars="= ">
		<param longName="param-a" shortName="a" type="float" description="The coeficient of x^2 in the second degree equation."></param>
		<param longName="param-b" shortName="b" type="float" description="The coeficient of x in the second degree equation."></param>
		<param longName="param-c" shortName="c" type="float" description="The free coeficient in the second degree equation."></param>
		<param longName="verbose" shortName="v" type="bool" isOptional="true" defaultValue="true" description="Shows details about the algorithm.">false</param>
		<param longName="complex" shortName="C" type="bool" isOptional="true" defaultValue="true" description="Show complex solution too.">false</param>
	</parameters>
</configuration>

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
Romania Romania
Just you average programmer geek from Romania. Student at Faculty of Computer Science, Al. I. Cuza University Iasi, Romania.

Comments and Discussions