在 C# 中,当异常为希伯来语时,它会反转 - 如何解决?
In C#, when the exception is in Hebrew it reversed - How to solve?
我开始学习C#,当我遇到错误时,它是希伯来语,(这很酷),但是希伯来语被颠倒了。
本来想把错误写在这里的,但是复制的时候突然好了,所以我加了个截图。
The screenshot
当我试图检查我是否可以将字符串转换为他的 ASCI 值时发生了。代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CSharpConsoleApp1
{
class Program
{
static void Main(string[] args)
{
int x = int.Parse("a");
Console.WriteLine(x);
}
}
}
我怎样才能看到未反转的希伯来语?
谢谢
在Windows 命令行中显示RTL 似乎是problematic。如果你只是想看到异常"normally",你可以尝试捕获消息然后反转它。它并不完全完美,但应该有所帮助。
try
{
int x = int.Parse("a");
Console.WriteLine(x);
}
catch (Exception e)
{
Console.WriteLine(e.Message.Reverse().ToArray());
}
我开始学习C#,当我遇到错误时,它是希伯来语,(这很酷),但是希伯来语被颠倒了。
本来想把错误写在这里的,但是复制的时候突然好了,所以我加了个截图。
The screenshot
当我试图检查我是否可以将字符串转换为他的 ASCI 值时发生了。代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CSharpConsoleApp1
{
class Program
{
static void Main(string[] args)
{
int x = int.Parse("a");
Console.WriteLine(x);
}
}
}
我怎样才能看到未反转的希伯来语?
谢谢
在Windows 命令行中显示RTL 似乎是problematic。如果你只是想看到异常"normally",你可以尝试捕获消息然后反转它。它并不完全完美,但应该有所帮助。
try
{
int x = int.Parse("a");
Console.WriteLine(x);
}
catch (Exception e)
{
Console.WriteLine(e.Message.Reverse().ToArray());
}