Jestem w trakcie odświeżania składni C# i natrafiłem na problem dotyczący wywoływania funkcji.
Oto kod:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace test
{
class Program
{
public double dodaj(double a, double b)
{
return a + b;
}
static void Main(string[] args)
{
Console.WriteLine(dodaj(2, 1)); // funkcja dodaj nie jest wykrywana
Console.ReadLine();
}
}
}
W czym problem?