Solved

Javascript to c#

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

759 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now