C# 공백, Null값 확인 IsNullOrEmpty

sso·2024년 2월 1일
0

C#

목록 보기
5/8

string.IsNullOrEmpty(문자열)을 통해 기능을 사용할 수 있다.

string str1 = string.empty;
string str2 = "2";
if(string.IsNullOrEmpty(str1) == "1" || string.IsNullOrEmpty(str2) == "1")
{
	return true;
}
return false;
profile
오늘도 하나씩 해결해 나가자!

0개의 댓글