C# 如何更改C代码

C# 如何更改C代码,c#,C#,我的朋友上周展示了一件好事,那就是他能够将c语言代码从: 致: 他所做的是将int改为num。因此我想知道是否有办法在cThanks上实现这一点。有关更多信息,请查看MSDN上的 你就是这样做的 using num = System.Int32; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { num a =

我的朋友上周展示了一件好事,那就是他能够将c语言代码从:

致:

他所做的是将int改为num。因此我想知道是否有办法在cThanks上实现这一点。有关更多信息,请查看MSDN上的

你就是这样做的

using num = System.Int32;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            num a = 1 + 1;
        }
    }
}

它执行时没有错误吗?我不想听起来粗鲁,但这有什么意义吗?但是,这是一个有趣的问题,尽管它确实有意义,但这是你做它的方式,但更重要的是,不要。因为它所做的只是让你的代码更难阅读。你可能想改变它的系统。Int32@AntP,我完全同意你。。。但是,让程序员决定什么对他来说是最好的,并希望代码的维护者知道这一点。如果op想了解更多关于alias的信息以及它的用途,您可能需要为alias添加msdn的链接
num a =1+1;
using num = System.Int32;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            num a = 1 + 1;
        }
    }
}