这就是我所尝试的内容。请建议我如何将Assci代码转换为字符。
class Decryption
{
static void Main()
{
string file = @"C:\Users\Me\OneDrive\CSharpProgramming\CipherText.txt";
string text = File.ReadAllText(file);
// displaying the contents of the file being read from...
Console.WriteLine(" Encrypted Text: \n\n{0}", text);
foreach (char c in text)
{
int ASCIIValues = (char)c - 4;
Console.Write(ASCIIValues);
}
Console.ReadLine();
答案 0 :(得分:0)
你想要这个
吗?int ascii = 50;
char b = (char)ascii;
试试这个
int[] arr;
for(i<n)
{
string p += (char)arr[i]+4;
}