Pages

Thursday, June 2, 2011

String was not recognized as a valid Boolean In C#

String was not recognized as a valid Boolean In C# .

Introduction : In this article i will show how to resolve the error string was not recognized as a valid Boolean in . Its very easy to resolve .just you need to create one method .Pass the string to method then it will return Boolean .

Method for valid Boolean :
    private static bool GetBoolean(string strValue)
    {
        if (strValue=="1")
            return true;
        else
            return false;
    }

Call the function :
 GetBoolean(stringValue) ;

Related Other posts

1 comment:

  1. The theme of your blog іs extremely frеsh, I am positіve that thе fοlks who will cοme
    across your blogs will tаke a lot from уour contеnt and opiniοnѕ.
    Feel free to visit my site tall shoes

    ReplyDelete