Re: What's wrong with Private keyword

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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
.



Relevant Pages

  • Re: buildworld failures on STABLE
    ... compiler error: Segmentation fault: 11 ... The compiler dying with signal 11 is a typical memory problem. ... kernel places strict limit to amount of memory that user-level application ...
    (freebsd-stable)
  • Re: Compiler error or my mistake
    ... does not give an error if str is null. ... Is this a compiler error? ... the execution. ...
    (comp.lang.c)
  • Re: Newbie needing some help with segmentation fault
    ... Hendrik Maryns wrote: ... snip ... ... I get the following compiler error here: ... All perfectly standard. ...
    (comp.lang.c)
  • Re: Inconsistent behaviour
    ... Razvan wrote: ... > Compiler error or expected behavior? ... To be able to catch a checked exception a method inside the try block ...
    (comp.lang.java.programmer)