使用系统API函数,需要使用命名空间:System.Runtime.InteropServices; 1、if(textbox1.text=="") 2、if(textbox1.text==string.empty) 3、if(string.isnullorempty(textbox1.text))