天天看點

C#程式設計:三種方法判斷文本框是否為空

使用系統API函數,需要使用命名空間:System.Runtime.InteropServices;

1、if(textbox1.text=="")

2、if(textbox1.text==string.empty)

3、if(string.isnullorempty(textbox1.text))

繼續閱讀