ToUpper() method not working

前端 未结 6 855
星月不相逢
星月不相逢 2021-01-20 09:52

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

6条回答
  •  隐瞒了意图╮
    2021-01-20 10:14

    Strings are immutable, so calling the functions on the string doesn't actually change the strings. Instead they return a modified copy of the strings.

    This means that you have to store the returned value of the functions, fore example in the original variable.

提交回复
热议问题