c# - Use Linq to iterate over ConfigurationManager.ConnectionStrings? -


is possible this?

var strings = configurationmanager.connectionstrings;  var names = (from d in strings              select new connectionname(d.name)); 

yes, because connectionstrings not implement typed ienumerable, have tell linq type collection contains.

use either from connectionstringsettings d in strings or configurationmanager.connectionstrings.cast<connectionstringsettings>().


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -