---
title: "A better command line parsing class"
url: "https://osherove.com/blog/2005/10/16/a-better-command-line-parsing-class.md"
canonical: "https://osherove.com/blog/2005/10/16/a-better-command-line-parsing-class.html"
published: "2005-10-16T17:22:00"
updated: "2005-10-16T17:22:00"
tags: [".Net Original"]
author: "Roy Osherove"
description: "Mike has recently recommended a command line parser library for .NET called Param.NET . Personally, I don't think this sort of thing should be driven (as is param.net) by a configuration file. In fact, custom attributes…"
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# A better command line parsing class

By Roy Osherove October 16, 2005 In [.Net Original](https://osherove.com/blog/category/net-original)

**Historical article** · Originally published October 16, 2005; technical details may be outdated.

Mike has [recently recommended](http://www.larkware.com/dg4/TheDailyGrind729.html) a command line parser library for .NET called [Param.NET](http://www.codeproject.com/useritems/ParamNET.asp). Personally, I don't think this sort of thing should be driven (as is param.net) by a configuration file. In fact, custom attributes could be put to some great use here.

I while I ago I tried and liked a different solution to the same problem using Attributes. [Check it out here](http://www.codeproject.com/csharp/commandlineparser.asp).

I think it's a cleaner design with less hassle and a nice use of the technology. I based a class on this with some modification, but this is a good place to start!

## More in .Net Original

[All posts in .Net Original](https://osherove.com/blog/category/net-original)

- Sep 10, 2006

    ### [Regulazy 1.02 is out and about](https://osherove.com/blog/2006/9/10/regulazy-102-is-out-and-about.html)

- Sep 9, 2006

    ### [How to create your own Auto Login Remote Desktop Application](https://osherove.com/blog/2006/9/9/how-to-create-your-own-auto-login-remote-desktop-application.html)

- Aug 22, 2005

    ### [Tips for a successful MSMQ-enabled application](https://osherove.com/blog/2005/8/22/tips-for-a-successful-msmq-enabled-application.html)

- Aug 17, 2005

    ### [\[Audio Interview\] Ingo Rammer and Christian Weyer On Distributed Applications Architecture And Practices](https://osherove.com/blog/2005/8/17/audio-interview-ingo-rammer-and-christian-weyer-on-distribut.html)


---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
