This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Originally posted by sweety singh: 2. can anyone give me an example for not using assertions to validate command line arguments.
Dunno what you mean by an example. I can give reasons, if that's what you mean.
Assertions are for checking internal assumptions and consistency of a program. The conditions checked by assertions should be ones that are always true, unless there is a bug in the program.
Assertions are not for checking user input, resource availability, I/O success etc. Remember that assertions are turned off in release code, so if they were used for such checks, the checks would not happen in release code.
Command-line arguments are user input. Bad command-line arguments are not a bug in the program that's reading them. Therefore assertions should not be used for checking them.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com