Randomly generated terrain in C#
So I found some code on here, from someone else (as a disclaimer this code is NOT mine), however I would like some help in getting the C# sharp translation perhaps, or at least some code that works in a very similar way. Someone by the name of Jceipek posted an answer to a question on this sight, however, the code was in JavaScript and it would help if my project was in C# instead. I'll post a link to the page where they posted the code so you folks could help a n00b out (I am relatively new to coding to this degree).
I would like to thank you in advance for any tips r pointers that you may have that will help me. ,I found some code, by a community member on this website, that allowed them to randomly generate terrain (as in the 3D game object, Terrain) within their game world, however, it's in JavaScript, and I kinda need it in C#. Now I'm relatively new to coding so I'm not sure which parts need translating (I notice that JS uses "function" and C# uses "void" but that's it).
Does anyone know any code that works similar to this code or know how to translate (that would be the better option). Thank you in advance.
If you follow the link and look at the bottom of the page where Jceipek posted their response to the question, that's the code I would like translating.