C#/.NET - string array to int array
3/6/2007 2:50:00 PM
After being working with graphic diagrams i've did find a new
method for array converting, it's a big code difference by use this
function below instead of creating it by my self, it's easy too but
time is money as my teachers always says to me.
Here is the wonderful code with an example.
string[] sArrNumbers = new string[] { "2", "4", "3", "6",
"8", "1", "5" }; int[] iArrNumbers = Array.ConvertAll<string,
int>(sArrNumbers, new Converter<string,
int>(Convert.ToInt32));
Hope some of you will enjoy it ;)
Kommentarer
Der er ingen kommentarer skrevet
Tilføj en kommentar