Reputation: 59
I would like to convert the string stored as (STATUS,STATE) to lower case. Here is my code :
attrVal_TestCondition = Update_Bugs[m].Attributes["TestCondition"].Value;
where output for attrVal_TestCondition
is (STATE,STATUS)
and i would like to convert this to lower case.
So i want my string to look like this :
(state,status)
Please suggest.
Upvotes: 2
Views: 1195
Reputation: 11577
to convert string to lower case do:
str.ToLower();
and in your case:
Update_Bugs[m].Attributes["TestCondition"].Value.ToLower();
or
Update_Bugs[m].Attributes["TestCondition"].Value.ToString().ToLower();
Upvotes: 1
Reputation: 1
In case No Idea For Name's answer is not blindingly obvious enough for you,
attrVal_TestCondition = Update_Bugs[m].Attributes["TestCondition"].Value.ToLowerCase();
That the string is comma separated has no bearing on anything. You are essentially asking how to lower case a string. What the string contains is not relevant.
Upvotes: 0