Can we used return type in static method in c#
Static void add(int x, int y)
{
return 10+20;
}
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amit Kumar SinghPosted Jul 3, 2021, 12:41 PM
Hi,
statickeyword before a return type and after an access modifierRegards,
Amit
Rajanikant HawaldarPosted Jul 3, 2021, 12:37 PM
yes we can, refer below example,