| re: textBox question
And, remember that Textboxes, by their very nature, only hold string data.
Taking that data out and treating like anything but a string would
necessitate a cast.
"Gabriel Magaņa" <no-spam@no-spam.com> wrote in message
news:eFXSH1kPGHA.532@TK2MSFTNGP15.phx.gbl...[color=blue]
> int.Parse(textBox.Text) ??
>
> And handle errors accordingly...
>
>
> "Justin Naidl" <jnadz@lsol.net> wrote in message
> news:4407776f$0$25083$4fcefb0e@news.tm.net...[color=green]
>> I'm using C# and building a basic windows application, but I can't for
>> the life of me figure out how to get an integer/long value from a text
>> box. I have written a function which converts a string to an int/long
>> but I feel like there should be an easier way of doing this. Either via
>> a built in string to int conversion or just using the textBoxes.
>>
>> Thanks for any help.
>>
>> ~Justin
>>[/color]
>
>[/color] |