Solved

Javascript to c#

Posted on 2007-03-27
2
2,410 Views
Last Modified: 2013-12-17
I need the equivalent of this two function in c#


   JAVSCRIPT                                     C#
--------------------------------- -----------------------
String.fromCharCode                     ?
str.charCodeAt(i)                           ?
0
Comment
Question by:karanba
2 Comments
 
LVL 1

Accepted Solution

by:
aspnetguy earned 125 total points
ID: 18800152
JS
var test = String.fromCharCode(112, 108, 97, 105, 110);

C#
String s = new String(new char[] {112,108,97,110});

JS
str.charCodeAt(i)

C#
(Int32)str[i];
0
 

Author Comment

by:karanba
ID: 18806149
String s = new String(new char[] {112,108,97,110});


I got error with this.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question