G
Guest
Hi,
If I have an abstract class with variables in it, for example:
public abstract class A
{
private int A;
private int B;
public abstract void DoSomething();
}
Do I create the Property methods in the abstract class or the inheriting
class, for example
public class B : A
{
public override void DoSomething()
{
//
}
public int A
{
get
{
return a;
}
set
{
a = value;
}
}
public int B
{
get
{
return b;
}
set
{
b = value;
}
}
Or do properties belong in the abstract class?
Stephen
If I have an abstract class with variables in it, for example:
public abstract class A
{
private int A;
private int B;
public abstract void DoSomething();
}
Do I create the Property methods in the abstract class or the inheriting
class, for example
public class B : A
{
public override void DoSomething()
{
//
}
public int A
{
get
{
return a;
}
set
{
a = value;
}
}
public int B
{
get
{
return b;
}
set
{
b = value;
}
}
Or do properties belong in the abstract class?
Stephen