program.cs

来自「这是.net2005学习不可缺少的教程」· CS 代码 · 共 29 行

CS
29
字号
using System;
class Method
{
    public static int Add(int i, int j)
    {
        return (i + j);

    }
    public static string Add(string s1, string s2)
    {
        return (s1 + s2);

    }

    public static string Add(string s1, int b)
    {
        return (s1 + b.ToString());

    }
    public static int Main()
    {
        Console.WriteLine("{0}", Add(1, 2));
        Console.WriteLine("{0}", Add("1", "2"));
        Console.WriteLine("{0}", Add("1", 2));

        return 0;
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?