I can't seem to figure this out...a little help please, thank you vm!
I have a generic collection of Features. Each Feature has a FeatureId and FeatureName. I need to pass the featureids into an IEnumerable<string>
.
I thought I was close with this:
Listing.Features.ToArray().Cast<string>().AsEnumerable();
and even tried to 'MacGyver' it like
var sb = new System.Text.StringBuilder();
foreach (Feature f in Listing.Features)
{
sb.AppendFormat("{0}", f.FeatureId);
}
SelectedFeatures = sb.ToString().ToArray();
SelectedFeatures being the IEnumerable<string>
.
Am I getting close? I like the first attempt better as it's cleaner but am not picky anymore now that I'm stuck