locked
How to Use case insensitive comparison by values to lowercase. RRS feed

  • Question

  • User1229570892 posted

    Hi,

    I need help for this

    if (Model.Test() == Resources.Test & operatingSystem.ToString() == Resources.os)
    continue;

    Friday, August 14, 2020 6:30 AM

All replies

  • User1686398519 posted

    Hi mishraashok5,

    You can use "string.Equals" and set "StringComparison.CurrentCultureIgnoreCase" for comparison to achieve case-insensitive requirements.

    var result=string.Equals("a", "A",StringComparison.CurrentCultureIgnoreCase);

    Here is the result.

    Best Regards,

    YihuiSun

    Friday, August 14, 2020 9:50 AM