book number 1:
docs.microsoft.com/dotnet
for overarching themes, such as the explanation of all the different components in Microsoft's developer ecosystem, a high level view of their strengths and features, and intro things such as the difference between what the .net framework and .net core are ect...
I believe .Net excels because it is an entire ecosystem that provides strong cohesion between each independent component. It provides the option for pleasant end to end solutions that all exist in one simple universe to be created. And is backed by an dedicated developer community, who places an emphasis on up-to-date, concise documentation.
Which leads me to book number 2:
msdn.microsoft.com
This is a gold mine for information, examples, and tutorials. The material is accurate and kept up to date. This will be your go to in day to day coding. A quick google search "msdn topic" usually brings up the exact page you need, or will at least give you a starting point as to where to explore next. Great, great resource.
A good starting tutorial is: https://msdn.microsoft.com/en-us/library/67ef8sbd.aspx
I know you asked for books, but when it comes to world of cs, there are just too many different softwares, libraries, or frameworks(each updating at a rapid pace with the awesome open source movement occurring) to avoid learning straight from the source. trust me this is a skill acquired, and a constant, continuous learning experience in and of itself. These docs are pristine and would serve as a great into to that art as well.
enjoy
First off, I would recommend that you follow the language style guidelines, you can find lots of examples in the MSDN C# Programming Guide. One thing that stood out to me immediately is that you use camelCase for methods instead of TitleCase. The former is the Java standard, the latter is used by C#.
Secondly, you violate single-responsibility in Main
, when you print out that ASCII art to the console. Printing the welcome message should exist as its own method called by Main
, rather than intermingling it with the responsibility of "starting the server". Try to think about breaking your program into logical layers like this, so "starting the server" includes "printing a welcome message", but the functionality of each of those tasks deserves a segregated method.
Third, you use magic constants. This is bad design. What I mean by magic constants is that you "hardcode" the values for certain things, such as the server port number. This implies that these values will never need changing, but that's very rarely the case in professional development. Look into Configuration Files, they help you by allowing a specific value to be linked to a name outside of your code. Your code then loads in these values and you can access them wherever you need. Then, if you want to change a value, it becomes easy, you only change it in one spot, and the entire application continues to function as expected.
Finally, I didn't take a terribly in-depth look, sorry, I'm a bit rushed, but I didn't see any unit tests. Read up on them. They might seem annoying at first, but they'll help keep your sanity as your projects grow in size.
Hope this helps, best of luck and congrats on learning C#, it's a really great language IMO.
Edit: Fixed broken link.
I always recommend the Unity Scripting Tutorial Series.
For more detailed information MSDN has a guide.
C# Programming Guide (Microsoft)
These are great places to start, written by the people that created the languages. Can't really go wrong there.
Sounds like you might want to work through some C# tutorials instead of just Unity tutorials. Microsoft's C# programming guide is probably a good place to start.
MSDN (Microsoft Developer Network) is a great resource for C# stuff, here are some links pertaining to C# that I frequent when doing C# development. They go from absolute beginners to super advanced. You can also rely on them having the correct and up to date information, which can't be said for many tutorials on the web.
As others have said, C# and Java basic syntax is nearly identical, so much so that you could copy and paste many java classes into C# and only switch out the keywords and they'd work the same. That being said though, C# does have some more things like LINQ for doing things with collections.
The standard libraries of both will share many of the same data structures albeit worded slightly differently, that's perhaps what you might want to read up on most.
For the details you might want to check out the wikipedia entry on this exact topic Comparison of C# and Java and just learn the differences :).
MSDN is a great learning resource for C# to get you started with the basics which you could power through with your existing knowledge.
MSDN should be your bible then if you have that kind of background. The API reference has conversions for pretty much everything from C++ to C#. Those that aren't managed can be found on the pInvoke wiki.
MSDN Ref https://msdn.microsoft.com/en-us/library/618ayhy6.aspx
MSDN C# Guide https://msdn.microsoft.com/en-us/library/67ef8sbd.aspx
PInvoke http://www.pinvoke.net