CSharp  roadmap. This post is part of the Xamarin Roadmap that you can check if you didn’t. It is good to remember that this guide is just an introduction to C#, it can not be taken as the final guide.

To continue with Xamarin Roadmap it is necessary to understand the base C#, that is why we have included the CSharp Roadmap. There some things you need to know before to start this CSharp roadmap as a guide. I really recommend you to check this link.

Note: As I said in the introduction post, what I have done is to take as a base the roadmap proposed by Xamarin University to create a new one. So, If you want to see the original base I really recommend you to go there before they migrate it to Microsoft Learn.

Introduction to C

This track provides an introduction to the C# programming language.

Introduction to C# [CSC101]

A key step in becoming a C# developer is building and running your first program. Even a simple program requires that you have your development machine set up correctly and that you know the core C# syntax. In this module, you will install Visual Studio, create a console application, write code to perform a calculation, and display output to the user.

  • Know the role of C# and Xamarin
  • Set up and run your first program
  • Learn the fundamentals of C#

Useful links

Exploring on your own

Branching and Looping [CSC102]

Programs often need to evaluate data and make choices based on the values they discover. This module covers how to read user input, branch or loop based on the input values, and convert the results to strings for display.

  • Implement conditional branching
  • Discover and use loops in your code

Useful links

Exploring on your own

Recommended Prerequisites: Introduction to C# [CSC101].

Object-Oriented Programming [CSC103]

There are many ways to organize your code that all lead to correct programs. One of the challenges of being a developer is evaluating these different options and choosing the one that best fits your goals. One popular approach is called Object-Oriented Programming (OOP). This module introduces the core OOP principles and shows you how to apply them to your C# code.

  • Determine classes and relationships in a program
  • Create a class with fields to maintain state
  • Use enumerations to define constant values

Useful links

Recommended Prerequisites: Branching and Looping [CSC102]

Adding Behavior into our Apps [CSC104]

A C# class is a container that groups together data and its associated operations. The data is typically stored in fields with a construct called a property controlling access. The operations are called methods and provide the logic to perform work related to the class. This module shows you how to define and invoke both properties and methods. By the end of the module, you will be able to write a class that models the data and behavior of a real-world object.

  • Create a class with methods to provide behavior
  • Utilize properties to hide our fields

Useful links

Exploring on your own

Recommended Prerequisites: Object-Oriented Programming [CSC103]

Building a Console Application [CSC105]

Previous module introduced the core features of programming with C#. This module will put these individual pieces together by guiding you through the creation of a larger-scale application. You will build a Console Application that reads user input, converts the input from a string to a numeric type, performs a calculation that includes branching and looping, and display the results to the user.

  • Define a custom type using a class
  • Create properties to control access to data
  • Repeat a block of code with a loop
  • Create methods to add behavior to classes

Useful links

Exploring on your own

Recommended Prerequisites: Adding Behavior into our Apps [CSC104]

Method Parameters and Constructors [CSC106]

A key part of working with methods is sending arguments in and getting results out. This module shows you how to use optional parameters to add flexibility to method inputs and how to use output parameters to return multiple values. Another important issue for any programming languages is initialization of data fields. Whenever you create a new object, you should think about what values you should assign to the fields to ensure the object is ready for use. This module covers how to use special methods called constructors to perform this initialization.

  • Pass information into methods
  • Receive information from methods
  • Initialize objects using constructors

Useful links

Exploring on your own

Recommended Prerequisites: Building a Console Application [CSC105]

Collections [CSC107]

Almost every program will have a collection of data. For example, an email app stores a list of your contacts, a web browser displays the websites you have visited, and a weather program shows the forecast for your favorite cities. To code this, you would create a collection by storing your values inside a data structure. This module shows you how to use three of the most popular collection types: array, List, and Dictionary.

  • Use arrays to load static data sets
  • Use lists and dictionaries to manage data

Useful links

Recommended Prerequisites: Method Parameters and Constructors [CSC106]

Debugging and Exceptions [CSC108]

Even careful programmers make mistakes. They might forget to validate user input or let a loop continue to run for one extra iteration after it should have stopped. Issues like these are so common that finding and fixing errors is considered a core programming skill. This module shows you two debugging techniques: using a debugger to examine the state of your program during its execution and using exceptions to write code that responds to problems as the program runs.

  • Use the debugger to examine executing code
  • Throw and catch exceptions to respond to errors

Useful links

Exploring on your own

Recommended Prerequisites: Collections [CSC107]

Inheritance and Polymorphism [CSC109]

Computer programming involves creating a software model of things that exist in the real world. One important real-world relationship is often described as "is-a". For example, a dog is-a animal, a truck is-a vehicle, and an undergraduate is-a student. C# includes a feature called inheritance that lets you model the is-a relationship in your code. This module shows you how to use inheritance to model the types in your world that are related though is-a. It also introduces a related idea called polymorphism that helps your code handle multiple different data types without the need to write a specific case for each one.

  • Use inheritance to eliminate repeated code
  • Use virtual methods and polymorphism to write generic code

Useful links

Exploring on your own

Recommended Prerequisites: Debugging and Exceptions [CSC108]

GC Fundamentals [CSC270]

Most modern programming languages and runtimes include Garbage Collection because it relieves the developer of some of the burden of managing memory. Unfortunately, it is not completely automatic because the way your write your code impacts the performance of the Garbage Collector. This module shows you how to help the Garbage Collector do its job efficiently. You will apply coding strategies that can reduce the workload of the Garbage Collector and use environment variables to tune the Garbage Collector's behavior for the way your app uses memory.

Useful links

Exploring on your own

Recommended Prerequisites: Introduction to C# [CSC101]

Managing Non-Memory Resources [CSC271]

Apps often need to work with resources such as local databases, files, and network connections. The usage pattern is similar in all cases: acquire the resource, use it, then release it when you are finished. Releasing the resource is tricky because you might accidentally omit the clean-up code or it might not be obvious when you are finished if the same resource is used from many parts of your program. This module shows you three ways to make release of non-memory resources less error prone: IDisposable, Finalizers, and SafeHandle.

Useful links

Exploring on your own

Recommended Prerequisites: GC Fundamentals [CSC270]

Using Async and Await [CSC350]

Apps often need to perform long-running operations like downloading data from the cloud or accessing the local file system. The libraries that do this work for you generally offer asynchronous APIs that let your app stay responsive to user input while these operations run in the background. This module shows you how to use the async and await keywords to write this type of asynchronous code. You will also see the details of the underlying implementation and discuss some best practices to follow when utilizing this C# feature.

Useful links

Exploring on your own

Recommended Prerequisites: GC Fundamentals [CSC270]

Writing Multithreaded Mobile Applications [CSC351]

If an application appears to be stuck, the user may assume it has crashed and restart or even uninstall the app. The core technique to keep your app responsive is to delegate work to background threads so the UI thread is available to monitor user actions. This module shows you how to use Tasks to move CPU-bound work onto background threads. You will see how to create and manage Tasks, how to handle exceptions, and how to support cancellation.

Useful links

Exploring on your own

Recommended Prerequisites: Using Async and Await [CSC350]

Introduction to Thread Safety and Synchronization [CSC352]

Multithreaded code can increase parallelism and therefore help your app run faster. However, multiple threads require you to manage their access to any shared data. Adding the right amount of synchronization is tricky because too little results in corrupted data while too much decreases parallelism and slows down your app. This module begins with a thorough discussion of what makes code unsafe so you will be able to identify the parts of your app that require synchronization. It then shows you how to use the Monitor class and the C# lock keyword to synchronize access to shared data.

Useful links

Exploring on your own

Recommended Prerequisites: Writing Multithreaded Mobile Applications [CSC351]

More about Synchronization [CSC353]

Managing multiple threads requires careful work in two areas: synchronizing access to shared data and coordinating the activity of threads working together on a common task. This module shows you two synchronization techniques: ReaderWriterLockSlim to allow multiple simultaneous reads and SemaphoreSlim to allow full access by a specific number of threads. The module also covers three coordination patterns: event-based with ManualResetEventSlim, countdown with CountdownEvent, and rendezvous with the Barrier class. Finally, the module surveys the thread-safe collections in the System.Collections.Concurrent namespace.

Useful links

Exploring on your own

Note: This module is a continuation of CSC352.

Considerations

This CSharp roadmap is on GitHub in a public repository where everyone can support it or give us recommendations (PRs are welcome 😎). In the same way, the content will be updated here.

Of interest…

Resources:

Thank you somuch for reading this post! 

Others

feedback

I invite you to leave me your feedback about this post in the comment box. If you want me to talk about a specific topic or detail a few more topics, let me know. The most interesting topics will be added to my list of future posts.

Do you like posts like this? Then, subscribe  and activate push notifications to receive updates. See you next time!