Ali Shah
asked on
Convert the current item of array to lower
Hi  there,
I am iterating over the array and my requirement is that i convert the current item of an array to lowercase but it seems that there is not method available. Can you please help, i want some thing like this
sorry i had to replace the brackets with () here otherwise it was not letting me submit the question
regards,
I am iterating over the array and my requirement is that i convert the current item of an array to lowercase but it seems that there is not method available. Can you please help, i want some thing like this
for (short i = 0; i <= objValues.Length - 1; i++)
{
if(objValues[i].GetType() == typeof(string))
{
if (objValues[i].ToLower() == (SQL_GETDATE).ToLower())
{
stbColumns.Append("@" + arrStrColumnsValues(i)+ ",");
cmSql.Parameters.AddWithValue(arrStrColumnsValues[i], objValues(i));
}
}
}
sorry i had to replace the brackets with () here otherwise it was not letting me submit the question
regards,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ah thanks a lot it works like a charm
Not a problem, glad to help.
Open in new window
But really, this is the wrong way to do a string compare:
Open in new window
That's the way I would do a string compare.