C# Creating and using Functions

后端 未结 11 686
暗喜
暗喜 2020-12-28 18:08

I need help with C# programming; I am new to it and I come from C background. I have a Console Application like this:

using System;
using System.Collections         


        
11条回答
  •  甜味超标
    2020-12-28 18:34

    Because your function is an instance or non-static function you should create an object first.

    Program p=new Program();
    p.Add(1,1)
    

提交回复
热议问题