If you get an error message you don't understand, copy and paste it into Google - the chances are very good that someone else has met this before.
In your case loads of people have been confused by this one!
"A field initializer cannot reference the non-static field"[
^]
If you have a look at the links, it explains the problem - you can't declare and set a class-level variable to a non-static value.
con
is not inside a method, so it can't access non-static information in an initialiser (because it all has to be done before the class constructor is called)
Move the initialization into your class constructor, and you'll be fine:
public class MyFunctions
{
string connstring = ConfigurationManager.ConnectionStrings["EpfConnectionString"].ConnectionString;
SqlConnection con = null;
public MyFunctions()
{
con = new SqlConnection(connstring);
}
}