DEV Community

Cover image for Learning a New Language - C#!
Kenneth M. Colón Pagán
Kenneth M. Colón Pagán

Posted on • Updated on

Learning a New Language - C#!

The job search period in this industry can be very overwhelming and can lead to us losing direction on what to do next. Whether that’d be working on your previous projects, developing our knowledge on a language you’ve worked with before, or learning new languages.

I took this time to dip my fingers in the basics of a couple of languages I have been interested in. I decided to start with C#, a related language to the first language I worked with, C. It was an interesting experience getting a refresher and remembering where it all started.

I took some notes during this process and would like to share them with anyone who is beginning to work with C# or is interested.

One major difference I was not aware of before, was the compiling process. With C and C++, when the application is compiled, the compiler translates the code into the native code of the machine. With C#, the compiler converts the Intermediate Language(IL) or Common Intermediate Language(CIL) into the machine code. This is done before the IL or CIL can be executed.

An easy way to understand and view the structure of a C# application is with this diagram. I often refer to this to remind myself of the pattern of containers whenever needed. A container missing in this diagram is ‘Assembly’ a container for related namespaces.
Alt Text

This is another useful diagram to keep track of the ‘Bytes per Type’ which can come in useful when converting types.
Ex:

int myInt = 10;
double myDouble = 5.25;
Console.WriteLine(Convert.ToInt32(myDouble));  // convert double to in
Enter fullscreen mode Exit fullscreen mode

Alt Text

To learn about all of this and more, I took a Udemy course that I absolutely recommend for any C# beginner:
CSharp Beginner Tutorial

Top comments (1)

Collapse
 
tabathaslatton profile image
TabathaSlatton

That’s awesome that you’re working on a new language! Good work and thank you for the resource! 😁