+ 5

Given below is an java code. My question is how to achieve this same functionality in c#?

https://code.sololearn.com/c8B8TYSiSJ78/?ref=app

31st Dec 2019, 3:42 PM
Smit Kalkani
Smit Kalkani - avatar
3 Réponses
+ 1
It is not so straightforward in C#. You'll need to use something else. There a couple of good ideas in this post: https://stackoverflow.com/questions/27273328/equivalent-of-javas-anonymous-class-in-c
2nd Jan 2020, 4:16 PM
Gyorgy Theisz
Gyorgy Theisz - avatar
+ 5
Thanks gyorgy but I already got my answer when I get to know about delegates.
2nd Jan 2020, 6:20 PM
Smit Kalkani
Smit Kalkani - avatar
0
I am just a new learner, but i think you are asking for this.. https://code.sololearn.com/c4Y6NpmVpojD/#cs Creating and calling a new function. SayHello(); is the function that is defined as static.
2nd Jan 2020, 10:12 AM
Muhammad Shaheen
Muhammad Shaheen - avatar