Checking parameters should not be done in the main code. That's the job of unit tests. If you're checking parameters in the code, you're saying, "Programmer, we can't count on you to do your job, so we're going to check parameters every time this code is called".
While it was somewhat necessary in VFP, it really isn't necessary in C# because of static data typing.
If you're passing ints, strings, bools as flags for how to do things in the method, then checking that the right value is passed, you're again doing it wrong. Create a struct and pass one of those values.
>Right now I am working on the conversion of our VFP class library into C# dll. In VFP we checked parameters at the top and returned. There were also many other return exists in the methods.
>
>I already converted a few by not using early returns, but I think in general it should be OK - otherwise it's very hard to use if else if else nested logic.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer