I am passing a message from a server that gets stored into a string variable called strObject. I wish to convert the string inside strObject to upper case. So, I use ToUpper
This won't work since strings are immutable, you have to assign the value back to strObject
strObject = strObject.ToUpper().Trim();
Also there is nothing much done by the switch
as shown in your code, you can remove it unless this is not the entire code.
public void VerifyValue(String strObject, String strValue, int row)
{
//strObject.ToUpper().Trim();
//strValue.ToUpper().Trim();
if(strObject.ToUpper() == "TASK_STATUS")
{
if (m_taskStatus.taskStatus.ToString() == strValue.ToUpper())
{
ExcelRecorder(null, row);
}
else
{
ExcelRecorder("The value [" + m_taskStatus.taskStatus.ToString() + "] does not match with the given value.", row);
}
}
}