Is there any .Net function. I think if not, I have to make my own method.
The fact is that I have a function. It takes integers. If you pass an integer 0 or a zero value, it will still work. The problem is that the value of the empty text field is the value of String.Empty.
I do not want to use if's. I mean, it can, but much nicer, if I can simply name my function as follows
MyFunction (txtTextbox.Text)
But this will not work, because it cannot convert string.empty to an integer.
source
share