This is the second part of my C# for Java Developers series. Let’s have a look at how to write methods in C#.
Note that this is the second and last post in this series. I’ve decided that there are a lot more interesting languages to learn than C#. The reason I’m finally publishing this second part of the guide – over two years after the first part was published – is that I’m going through my old drafts.
Please consider reading the first part before you jump into this one. All the code you see – and more – is available in the C# for Java Developers GitHub repository. A word of warning: I’m writing this guide as I learn C# myself, so don’t except everything to be 100% accurate. Consider reading this as a way to kick start your own C# adventure.
With that out of the way, let’s have a look at methods.