Re: Equivalent of String.fromCharCode() method in C#
From: Nicholas Paldino [.NET/C# MVP] (mvp_at_spam.guard.caspershouse.com)
Date: 08/19/04
- Next message: David Browne: "Re: Equivalent of String.fromCharCode() method in C#"
- Previous message: Ignacio Machin \( .NET/ C# MVP \): "Re: Throwing Exceptions"
- In reply to: Bob: "Equivalent of String.fromCharCode() method in C#"
- Next in thread: David Browne: "Re: Equivalent of String.fromCharCode() method in C#"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 19 Aug 2004 14:51:35 -0400
Bob,
I would create an array of characters with those values. Once you do
that you can pass the character array to the constructor of the string class
and it will give you a string.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
"Bob" <anonymous@discussions.microsoft.com> wrote in message
news:93ff01c48619$38b5f610$a401280a@phx.gbl...
> In Jscript, fromCharCode returns a string from a number of
> Unicode character values.
> In the following example, test contains the string "plain":
>
> var test = String.fromCharCode(112, 108, 97, 105, 110);
>
> Does anyone know the equivalent of this method in J#?
>
> To understand the JScrip example, save the following as a
> html file and open that file
>
> <html>
> <head>
> <script language="jscript">
>
> function test() {
>
> alert(String.fromCharCode(112, 108, 97, 105, 110));
>
> }
> </script>
>
> <body onload="test()">
>
> <p id=writebefore>
> </P>
>
> </body>
> </html>
>
>
> Thanks,
> Bob
- Next message: David Browne: "Re: Equivalent of String.fromCharCode() method in C#"
- Previous message: Ignacio Machin \( .NET/ C# MVP \): "Re: Throwing Exceptions"
- In reply to: Bob: "Equivalent of String.fromCharCode() method in C#"
- Next in thread: David Browne: "Re: Equivalent of String.fromCharCode() method in C#"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|