Programming/C#

[C#] 비밀번호 공백 체크

호호호호히히히히 2021. 4. 13. 17:33
728x90
반응형
비밀번호 공백 체크 (How to check whether input value is included space)

 

using System.Linq;




private bool checkSpace(string str)
{
    if (str.Any(x => Char.IsWhiteSpace(x) == true))
    {
        return true;
    }
    else
    {       
    	return false;
    }
}

 

반응형