P
Paul Say
This is the situation I have a base class _Job that has an internal class PropertyNames (see code )
public abstract class _JobBase
{
private int _JobId;
private int _JobName;
public virtual int JobId
{
get{return this._JobId;}
set{this._JobId = value;}
}
public virtual string JobName
{
get{return this._JobName;}
set{this._JobName = value;}
}
public class PropertyNames{
public const string JobId = "JobId";
public const string JobName= "JobName";
}
}
When inheriting from _Job if I want to extend the PropertyNames inner class I am doing the following
public class Job:_JobBase
{
public string JobNameExtended
{
get{return this.JobId.ToString() & " - " & this.JobName;}
}
public new class PropertyNames:_JobBase.PropertyNames
{
public const string JobNameExtended = "JobNameExtended";
}
}
What I want to know is if this is the correct way of extending an inner class as this works, or if there is a better way.
Paul
public abstract class _JobBase
{
private int _JobId;
private int _JobName;
public virtual int JobId
{
get{return this._JobId;}
set{this._JobId = value;}
}
public virtual string JobName
{
get{return this._JobName;}
set{this._JobName = value;}
}
public class PropertyNames{
public const string JobId = "JobId";
public const string JobName= "JobName";
}
}
When inheriting from _Job if I want to extend the PropertyNames inner class I am doing the following
public class Job:_JobBase
{
public string JobNameExtended
{
get{return this.JobId.ToString() & " - " & this.JobName;}
}
public new class PropertyNames:_JobBase.PropertyNames
{
public const string JobNameExtended = "JobNameExtended";
}
}
What I want to know is if this is the correct way of extending an inner class as this works, or if there is a better way.
Paul