Re: What's wrong with Private keyword
- From: Jon Skeet [C# MVP] <skeet@xxxxxxxxx>
- Date: Mon, 7 May 2007 19:44:35 +0100
Private <Private@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Can some one tell me about what's wrong with the following code and what is
the solution with some meaningful correction
<snip>
Others have stated what's wrong. However, I think it's important to
note that if you look at the compiler error carefully, it's reasonably
clear:
Test.cs(11,17): error CS0120: An object reference is required for the
nonstatic field, method, or property 'Program.MaxNum(int, int)'
Yes, it uses "jargon" - but jargon you should make yourself familiar
with if you're not already.
If ever you get a compilation error and you don't know why, the first
thing to do is try to understand the error message itself. If there's
any terminology in there that you don't understand, *that's* the next
thing to fix.
--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.
- Follow-Ups:
- Re: What's wrong with Private keyword
- From: Göran Andersson
- Re: What's wrong with Private keyword
- Prev by Date: Multiple handlers for an event
- Next by Date: Re: Start User Process from Local System Service
- Previous by thread: Multiple handlers for an event
- Next by thread: Re: What's wrong with Private keyword
- Index(es):
Relevant Pages
|