Tuesday, May 7, 2013

Find the ASCII value of a string using CSharp (C#)


ASCII - The American Standard Code for Information Interchange. The below sample is a example for retrieving the ASCII value of a given string.
C# Code:
 String input = "ENTER YOUR INPUT STRING HERE";   
 String output = "";   
 foreach (char c in input)  
 {  
    output = output + (byte)c;  
 }  
 Console.WriteLine(output);  

No comments:

Post a Comment