他们之间有什么区别吗?谢谢
TextBox.Clear();
TextBox.Text = string.Empty;
最佳答案
实际上:不。内部是有的。两者都以完全不同的方式清除文本。
我不敢告诉你哪个更好,但如果你想追踪来源,here's for Clear()和 here's what it does when you change Text
关于c# - TextBox.Clear() 或 TextBox.Text = string.Empty,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34826980/