How to convert Ascii value to character in c#? -


this question has answer here:

i have ascii value stored int , want ascii convert character.

private void button2_click(object sender, eventargs e) {     string text3 = textbox1.text;     string text4 = "";     byte[] array = encoding.ascii.getbytes(text3);     foreach (char c in array)     {         int ascii = (int)c;         ascii = ((((ascii / 37 + 657) / 12) - 582) / 11);         text4 += ascii + "-";     }      textbox3.text = text4; } 

this simplest way of converting ascii value character , string:

int = 123; char c = (char)i; string s = c.tostring(); 

in example should work following:

text4 += (char)ascii + "-"; 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -