How can i add a new Functionor Property on textbox class's text property

Posted by Shantanu Gupta on Stack Overflow See other posts from Stack Overflow or by Shantanu Gupta
Published on 2010-04-23T09:59:10Z Indexed on 2010/04/23 10:03 UTC
Read the original article Hit count: 237

Filed under:
|

I want to add one more function/property to a text property of a textbox like this. txtControl.Text.IsEmpty(); or txtControl.Text.IsEmpty; which returns me bool value.

I dont want to compare for empty string every time.

i.e. if(txtControl.text==string.Empty) {} else {}

Can we do some other way also

if just want to do it like if(txtControl.text.isEmpty){}

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET