C#写其他语言输入法的问题
Problems with input when writing other languages in C#
class Exercise
{
static void Main(string[] args)
{
String a = Console.ReadLine();
int b = int.Parse(a);
if (b % 2 == 0)
{
Console.WriteLine("Числото а е четно" );
}
else
{
Console.WriteLine("Числото е нечетно");
}
}
}
我无法用我自己的语言输入文字。有没有办法导入图书馆或可以从英文字母中读取字母的东西?看截图的输入。
UTF-8 格式使用该西里尔字母表。
我找到了!抱歉垃圾邮件!
我必须将这一行添加到我的代码中。
Console.OutputEncoding = 编码.UTF8;
class Exercise
{
static void Main(string[] args)
{
String a = Console.ReadLine();
int b = int.Parse(a);
if (b % 2 == 0)
{
Console.WriteLine("Числото а е четно" );
}
else
{
Console.WriteLine("Числото е нечетно");
}
}
}
我无法用我自己的语言输入文字。有没有办法导入图书馆或可以从英文字母中读取字母的东西?看截图的输入。
UTF-8 格式使用该西里尔字母表。
我找到了!抱歉垃圾邮件! 我必须将这一行添加到我的代码中。
Console.OutputEncoding = 编码.UTF8;