C sharp设计方法并验证
多谢大虾的请教.......cc#.INT

解决方案 »

  1.   

    using System;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;namespace ConsoleApplication1
    {
        class Program
        {
            //设计方法
            static int Add(int a, int b) { return a + b; }        static void Main(string[] args)
            {
                int a = 3, b = 4;
                //验证
                Debug.Assert(a + b == Add(a, b));
            }
        }
    }