diff String.Isnullorempty& String.Notnullorempty [英] diff String.Isnullorempty & String.Notnullorempty
本文介绍了diff String.Isnullorempty& String.Notnullorempty的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
String.Isnullorempty&之间的基本区别是什么? String.Notnullorempty
例如:-
What is the basic difference between String.Isnullorempty & String.Notnullorempty
eg:-
public Boolean Validdata()
{
Boolean Valid = true;
if (string.IsNullOrEmpty(txtDate.Text))
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "Hello", "javascript:alert('Date Not Given')", true);
Valid = false;
}
if (string.IsNullOrEmpty(txtStartTime.Text))
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "Hello", "javascript:alert('StartTime Not Given')", true);
Valid = false;
}
return true;
}
推荐答案
String.Isnullorempty =它不为null,也不为空
String.NotnulloremptyI =它不为null或为空
在那里回答了相同的问题.
http://stackoverflow.com/questions/734372/string-isnullorempty-vs-string-notnullorempty [ ^ ]
String.Isnullorempty = It''s not null and it''s not empty
String.NotnulloremptyI = It''s not null or it is empty
the same question is answered there.
http://stackoverflow.com/questions/734372/string-isnullorempty-vs-string-notnullorempty[^]
这篇关于diff String.Isnullorempty& String.Notnullorempty的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文