Something like:
public int OrderItemCheckString(string strOrderItem) {
if (strOrderItem == null) {
return (int)E_NULL_STRING;
}
if ( good condition ) {
return (int)S_OK;
}
return (int)E_INVALID_STRING;
}
Then in your main.. you can use this to check the value.
However, I would create
public int AddOrderItem(string strOrderItem). Use the above method within it, and make it private.
Send me a PM if this doens't make sense. You should think of main as just a launching pad for what you do. Unless I'm tossing together a quick prototype, there is very little code in main..
Post edited at 3:59 pm on Oct. 15, 2008 by sakurag
-------
I've got spurs that jingle jangle jingle.
As I go riding merrily along.
And they sing, "Oh, ain't you glad you're single?"
And that song ain't so very far from wrong.