直接取应该这样写

System.Configuration.ConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString