I think it's required in c# or at least jsut the normal way of making quick programs. I don't think i've ever seen a function not tied to a class in c#.
Actually in C# you can specify ex. delegates outside of classes.
public delegate int Foo(int x, int y);
public class Program
{
public static void Main()
{
Foo foo = (x,y) => x + y;
Console.WriteLine(foo(10, 10));
}
}
But yeah generally everything has to be in classes.
37
u/OmnipotentCalculator Mar 20 '20
Won't compile. Return type void on fuckYourself is missing. 🤷♂️
26
u/HypnoToad0 Mar 20 '20
This class is kind of redundant
12
u/Soundless_Pr Mar 20 '20
but... why the delegate?
5
u/melonangie Mar 21 '20
That’s too much code to say so little. You should make a script that writes that code, downloas boarland and runs the program.
2
u/[deleted] Mar 21 '20
Print('you are dumb/n' * 10)
1
u/[deleted] Jul 27 '20
While (bool youDumb = true){ cout << "Fuck you" << endl; }
In c++;
1
u/[deleted] Mar 21 '20
[removed] — view removed comment