![](/img/trans.png)
[英]I have an array of colors and I want to assign the colors with the labels in the for loop in C#. How can I do so?
[英]How do I convert ASCII decimals to a string in C#. This is the code I have so far:
这是我尝试过的。请建议我如何将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();
你想要这个吗
int ascii = 50;
char b = (char)ascii;
尝试这个
int[] arr;
for(i<n)
{
string p += (char)arr[i]+4;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.