I have the following code
private string conn(string name)
{
return ConfigurationManager.ConnectionStrings[String.Format("{0}ConnectionString", name)].ConnectionString;
}
But I keep getting the error below on the return statement.
System.NullReferenceException: Object reference not set to an instance of an object
Can you please tell me what is wrong with this?