chuawenching Posted September 23, 2003 Posted September 23, 2003 Hi there, I had some questions. I was learning c# and i saw this code: static int amountopen = (0 - 500); Hmm.. wonder, does it means we are setting a scope from 0 to 500 for integer amountopen? This is first time i seen. Oh ya, another added question. How does virtual keyword comes in handy in c# programming? Any good samples and explanations on that please. Thanks. Regards, Chua Wen Ching :p Quote
*Experts* Volte Posted September 23, 2003 *Experts* Posted September 23, 2003 Looks like you're setting an int to -500... 0-500 is just zero subtract 500... -500. And a virtual class means a class that must only be inherited and cannot be used on its own. (example: a PrimaryColor class that you inherit RedColor, BlueColor and GreenColor from, but don't want PrimaryColor itself being used). Quote
chuawenching Posted September 23, 2003 Author Posted September 23, 2003 Oh thanks. So actually amountopen = -500 so actually why can't the coder place -500 at the first place but (0-500)? There must be a reason right? Oh so virtual is used for that. Thanks a lot. :) Anyway do you know which tutorial in c# which i can learn good oop design? I hope that tutorials utilizes oop concept in a better way. Any help? Thanks :) Regards, Chua Wen Ching :p Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.