Dotnet
Authentication and Authorization - Registration Part 1

Generics

PRO

I finished! On to the next chapter

Outline

Generics

C# is a strongly typed language. Unlike scripted languages, every variable must be specified with a type. This is where C# gets its speed and performance. Just as the name suggest, Generics allow you to create Classes & Methods that are different based on specifications but are still reusable. All while keeping type safety and strong type efficiency.

In C#, we can use a reusable Generic Class that is represented by a specific classes that serves a specific purpose. Your code becomes declarative and much more readable. There's no question that the "Registration" class is used to register a new user. While the "Login" class is used for authentication.

In the next video I'll show how these pieces come together.

Resources: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/generics