Monday, 31 October 2016

Fix Error - Non-invocable member 'System.Configuration.ConfigurationManager.ConnectionStrings' cannot be used like a method.

C# - Non-invocable member 'System.Configuration.ConfigurationManager.ConnectionStrings' cannot be used like a method.


Watch this example on YouTube



To fix it replace
System.Configuration.ConfigurationManager.ConnectionStrings("DefaultConnection").ToString();
With
System.Configuration.ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString();


No comments:

Post a Comment