Solved

Javascript to c#

Posted on 2007-03-27
2
2,437 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!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Dynamic Dropdowns 15 32
function parameter and using that as array 15 22
Making an "H1" a specific color only on a specific page. 3 26
2 separate CSS animations 2 16
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
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…

789 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