You don't have to. You can and should use the
System.Configuration
namespace:
var connectionString = ConfigurationManager.ConnectionStrings["CONNECTIONSTRINGNAME"];
If you're intent on accessing this value through a class property, you can do the following:
public class Foo
{
public static string ConnectionString
{
get { return ConfigurationManager.ConnectionStrings["CONNECTIONSTRINGNAME"]; }
}
}