0
How to link a void method to a name?
class Program { static void Sqr(int x) { x = 4; x = x * x; Console.WriteLine(x); } static void NewLink(int x){} static void Main(string[] args) { int a= 2; NewLink= Sqr(a); //<ââ- how to link? NewLink(); //<ââ- so I dont have to type all arguments. } } Is there a way u can call methods by simply linking them to a name (or something)so u dont have to type all arguments?
2 Answers
+ 1
I believe this does what your looking for:
https://code.sololearn.com/clrXkvSwGJ2A
+ 1
thx man!