Re: illegal characters
From: Jon Skeet [C# MVP] (skeet_at_pobox.com)
Date: 02/04/05
- Next message: Wayne: "Re: illegal characters"
- Previous message: Paul Aspinall: "Packaging MSDE in with Winforms C# app, using Windows packages"
- In reply to: Dave: "illegal characters"
- Next in thread: Wayne: "Re: illegal characters"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 4 Feb 2005 20:45:43 -0000
Dave <Dave@discussions.microsoft.com> wrote:
> I need to cut out illegal characters in a string submitted from a mobile
> phone to a web form. I need a way to check for the illegal characters in a
> textbox. I intend to loop through the text and remove the illegal characters.
> Is there an equivalent function to c# to chr() in Visual basic? I want the
> decimal value of a character, like "A" is 65 in ACII2. If there is a
> equilvalent command does it return ACII2 or unicode?
>
> I know there is a chr command in c# but it dosen't do the same thing.
There's no "chr" command (or any commands) in C#. However, you can just
use the unicode value:
int x = 'A'; // x will now be 65
-- Jon Skeet - <skeet@pobox.com> http://www.pobox.com/~skeet If replying to the group, please do not mail me too
- Next message: Wayne: "Re: illegal characters"
- Previous message: Paul Aspinall: "Packaging MSDE in with Winforms C# app, using Windows packages"
- In reply to: Dave: "illegal characters"
- Next in thread: Wayne: "Re: illegal characters"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|