Generics (Exercise) – Learn C#

0  comments

Generics are an amazing feature of C# and many other languages. They enable us to write code once and use it with many different types. What does that mean? Well, let’s find out!

This is an exercise for this YouTube video.

Happy learning and good luck!

 

Do you always have to specify the generic type when using generic methods?
Choose the correct generic constraint for C#.

Assignment: Create a method which will reverse the order of any array.

 

 

Click to see the answer

 

 

 

About the author 

Matt Rešetár

Matt is an app developer with a knack for teaching others. Working as a Flutter freelancer and most importantly developer educator, he doesn't have a lot of free time 😅 Yet he still manages to squeeze in tough workouts 💪 and guitar 🎸

You may also like

Flutter Custom & Staggered Page Transition Animation Tutorial

Flutter Firebase & DDD Course [5] – Sign-In Form Logic

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
>