Extension Method & Why is it a syntactic sugar | JWT Auth: Build a Library with me - II

Опубликовано: 16 Май 2026
на канале: Code with Saar
191
9

The first half talks about what is extension method and how to create one by yourself.
The send half talks about the essence of it - why is it a syntactic sugar.

Example code: https://github.com/xiaomi7732/CodeWit...
Extension method code in the library: https://github.com/xiaomi7732/CodeWit...

Syntactic Sugar

By Wikipedia: In computer science, syntactic sugar is syntax within a programming language that is designed to make things easier to read or to express. It makes the language "sweeter" for human use: things can be expressed more clearly, more concisely, or in an alternative style that some may prefer.

Chapters

00:00 Intro
01:00 Walk-through creating an extension method
03:38 Review how is extension method used in JWT Auth Library
05:14 Extension method is a utility method coated by syntactic sugar
07:42 Thanks for watching