P
Paul Tomlinson
The keyword new is required on 'B.IsValid' because it hides inherited member
'A.IsValid'
All I have a couple of classes which resemble (sort of!) this:
public class A
{
public bool bIsValid = true;
public bool IsValid
{
get{ return bIsValid; }
}
}
public class B : A
{
public bool bIsValid = false
public bool IsValid
{
get{ return bIsValid; }
}
}
Now whenever I call IsValid on an object of type A I always want to get
"true" returned, and likewise for an object of type B I always want to get
"false" returned.
How can I acheive this and get rid of this warning at the same time?
Thanks
MA
'A.IsValid'
All I have a couple of classes which resemble (sort of!) this:
public class A
{
public bool bIsValid = true;
public bool IsValid
{
get{ return bIsValid; }
}
}
public class B : A
{
public bool bIsValid = false
public bool IsValid
{
get{ return bIsValid; }
}
}
Now whenever I call IsValid on an object of type A I always want to get
"true" returned, and likewise for an object of type B I always want to get
"false" returned.
How can I acheive this and get rid of this warning at the same time?
Thanks
MA