#region Variables
public int dotsize = 10;
private Font pfont = new Font("Arial", dotsize, FontStyle.Bold, GraphicsUnit.Point);
when I place "dotsize" in the code i get an error:
A field initializer cannot reference the nonstatic field, method, or property
When I type
private Font pfont = new Font("Arial", 10, FontStyle.Bold, GraphicsUnit.Point);
everything is fine. How do I swap the word dotsize for the number 10 ?
Comment