L
Liz
The original question presented was how to get a "soft" match in an arrayHow about
string[] X = new string[]{"Anne", "Bob", "Chris", "Donna", "Elizabeth",
"Glenn", "Franklin", "Helene"};
using BinarySearch, i.e.: if no match, return the next highest value in
the array; so far as I know, there's no (straightforward) way to get
there from string[] x = {..,..,.. } syntax ...
I did Add "off topic" right before I asked (which you edited out).
I have no quibble over the Binary search suggestion, It is what I would
have suggested.
My question has nothing to do with that.
I simply wanted to know why you would Array.CreateInstance instead of the
more common syntax for array creation?
Is there some benefit that I am unaware of?
Bill,
First of all, your comment was not off-topic ....
I simply wanted to know why you would Array.CreateInstance instead of the
more common syntax for array creation?
that's what I responded to .... you can't do this:
string[] X = new string[]{"Anne", "Bob", "Chris", "Donna",
"Elizabeth", "Glenn", "Franklin", "Helene"};
X.BinarySearch("DonnaZ");
Do you know a way to initiate a BinarySearch using the array initialization
syntax you propose here?