I have the issue where I need to call a virtual function in my abstract class' constructor.
internal abstract class Item
{
protected Item(...)
{
...
CreateBuyButton(...);
}
protected abstract void CreateBuyButton(...);
}
If I have my code like this resharper is notifying me about the problem however if I refactor the call into another method resharper doesn't seem to count this as a problem and I'm not sure if it is a problem or not.
internal abstract class Item
{
protected Item(...)
{
...
GetValue(...);
}
protected abstract void CreateBuyButton(...);
private void GetValue(...)
{
CreateBuyButton(...);
}
}
Is this valid ? Will the problem still persist ?