Why should I make my next mobile app in Xamarin? #Part5: You are using C#!

In this brief post, the 5th of the series, we will analyze why it’s relevant that Xamarin is build around C#! πŸ™‚

Well, starting from basics, one of the main advantages of C# are the support of LINQ, which allows you to execute queries and select data from arrays and databases like SQLite. An example of LINQ:


Moreover, in C# you can easily manage Events and Delegates:


And you can work with IntelliSense and Lambda expressions!
Also, C# natively supports JSON through the Json.NET library. Json.NET offers simple conversions to and from JSON strings and .NET objects, with SerializeObject and DeserializeObject methods.
Here is an example of creating a class with a method to get names:

ObjCClass C#Class

In C#, one line with LINQ is used to execute the whole command. Also, the C# class takes advantage of C# features and set properties easily.
Last but not least, the Async/Await constructs will allow you to set up a multithreading environment with the lowest effort possible. Below here a comparison between the Async/Await and the same code written in Objective-C!
ObjCAsync C#Async

See you on the next post! πŸ˜€
Happy coding! πŸ™‚

2 pensieri su “Why should I make my next mobile app in Xamarin? #Part5: You are using C#!

  1. Have you ever thought about including a little bit more than just your articles?
    I mean, what you say is fundamental and all.
    But imagine if you added some great pictures or video clips to give your posts more,
    “pop”! Your content is excellent but with images and videos, this website could definitely be one of the greatest in its niche.

    Awesome blog!

    • Hello Kursus!

      First of all thanks for the appreciation and for the suggestion! πŸ™‚ Yeah you are right, if I integrated the content with some videos and more “media” in general I might be doing much better!

      I haven’t been blogging for a while now, since I have been quite busy and far from home, but since I am going back soon I will start with this new inspiration given by you, for sure! πŸ™‚


Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo di WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione /  Modifica )

Google photo

Stai commentando usando il tuo account Google. Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )

Connessione a %s...

Questo sito utilizza Akismet per ridurre lo spam. Scopri come vengono elaborati i dati derivati dai commenti.