Thursday, March 22, 2012

Take out last character from textbox or label

I am trying to find the best way to delete the last character from a
textbox.

For example:

status.text = "full/part/"

I want to take out the trailing "/".

Thanks,

Tomstring s = "xxx/";
s = s.TrimEnd("/".ToCharArray());
--
Mike

"tshad" <tscheiderich@.ftsolutions.com> wrote in message
news:eegYcvTbFHA.2896@.TK2MSFTNGP10.phx.gbl...
>I am trying to find the best way to delete the last character from a
>textbox.
> For example:
> status.text = "full/part/"
> I want to take out the trailing "/".
> Thanks,
> Tom

0 comments:

Post a Comment