I have a question related to the error on the title. Im working with c# and Visual Studio 2010.
I have a form declared as \"public class FormularioGeneral : Form\",
About the variables, can you simply initialize them in the declaration? I think that would suffice, even if you change the value later. From what I'm seeing, the compiler is unable to check whether you have initialized them or not because it's not directly on the constructor code, it's being done on a virtual method which will evaluate only at runtime.
So, instead of:
protected Color m_VariableName;
public Color VariableName
{
get { return m_VariableName; }
set { }
}
Do:
protected Color m_VariableName = Color.White; // Or null
public Color VariableName
{
get { return m_VariableName; }
set { }
}
And a comment: you should avoid virtual calls in the constructor, which can lead to obscure errors in your application. Check it here.