0
using System;

namespace Функции
{
    class MainClass
    {
        public static void Main()
        {
            Print ("Hi!");
            int kys;
                kys = cry(7, 3);
            Print (kys);
        }

        private static void Print(string v)
        {
            throw new Exception();
        }

        public static void Print(int kys)
        {
            Console.WriteLine(kys);
        }

        public static int cry (int a, int b)  
        {
            int rip;
            rip = a + b;

            return rip; 
        }
    }
}

I think I added main so I don't know what happened

Klaus Gütter
  • 11,151
  • 6
  • 31
  • 36
  • did you re-build the executable after adding `Main`? – mangusta May 04 '20 at 05:08
  • no,how can i do it? – Mercufyl May 04 '20 at 05:10
  • In VisualStudio: Build > Build solution With .NET Core: `dotnet build` – Klaus Gütter May 04 '20 at 06:44
  • If you plan to stick to c# for a while, then start with [naming guideline](https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/naming-guidelines). As for you issue, try giving namespace an non-cyrillic name (e.g. `Functions`). Not sure what `a.out` in errors means, shouldn't it be the path? Have you been [here](https://stackoverflow.com/q/386831/1997232) ? – Sinatr May 04 '20 at 07:29

0 Answers0