D
dejas9000
Hello.
I have see the error in the subject line pop up before when attempting
to reference a non-static member from a static context, however I am
now having this issue when referencing a non-static member from a non-
static context and can't quite figure out why. Can anyone shed some
light on this please?
public class DebugParser : Parser
{
protected internal IDebugEventListener dbg;
...
}
public class AGLParser : DebugParser
{
public IDebugEventListener mydbg = dbg;
...
}
results in:
An object reference is required for the non-static field, method, or
property 'DebugParser.dbg'
I have see the error in the subject line pop up before when attempting
to reference a non-static member from a static context, however I am
now having this issue when referencing a non-static member from a non-
static context and can't quite figure out why. Can anyone shed some
light on this please?
public class DebugParser : Parser
{
protected internal IDebugEventListener dbg;
...
}
public class AGLParser : DebugParser
{
public IDebugEventListener mydbg = dbg;
...
}
results in:
An object reference is required for the non-static field, method, or
property 'DebugParser.dbg'