The title says it all. :) I've been pondering this today, and I have a nagging feeling that this is something simple to implement and I'm just way out of it today, but anyway, here it is.
Instead of performing something like
// assume that I have a populated string[] myString
for (int i = 0; i < myString.Length; i++) {
myString[i] = myString[i].Equals(string.Empty) ? "foo" : "bar;
}
I'd like to do something like PHP's array_map(), which (I think) would perform faster than explicit iteration.
Does C# have capacity for this kind of operation?
Thanks guys.