What Are the Three Uses of The Using Statement? - C# Gotcha Interview Questions

  Рет қаралды 10,381

Ryan McBeth

Ryan McBeth

Күн бұрын

This is what I call a "Seymore" question. Seymore is that programmer who has been with the company for 8-12 years. He probably wrote the software that you are being hired to extend or maintain. His main objective is to prevent you from being hired because he doesn't want you to ask him questions all day.
You've probably the Using statement in C# to define the scope of an object or implement IDisposible. You've also probably used it to add a namespace to a class.
But did you know it can also create aliases and reference methods in static classes?
I like to remember the three uses of the Using statement with the mnemonic:
Dispose A Named SISter
This stands for:
Dispose and Object
Add a Namespace
Static Import Single

Пікірлер: 24
What is Reflection?  - C# Gotcha Interview Questions
4:49
Ryan McBeth
Рет қаралды 22 М.
Understand your C# queries! IEnumerable & IQueryable in explained
11:28
tutorialsEU - C#
Рет қаралды 40 М.
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 14 МЛН
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 34 МЛН
[BEFORE vs AFTER] Incredibox Sprunki - Freaky Song
00:15
Horror Skunx 2
Рет қаралды 20 МЛН
What are ASYNC and AWAIT in C#? Asynchronous Programming Tutorial
18:34
How IDisposable and Using Statements Work Together in C#
10:01
IAmTimCorey
Рет қаралды 33 М.
Functions vs Classes: When to Use Which and Why?
10:49
ArjanCodes
Рет қаралды 168 М.
Factorio teaches you software engineering, seriously.
21:27
Tony Zhu
Рет қаралды 2 МЛН
When to use - IEnumerable vs IList vs ICollection?
12:05
DotNetMastery
Рет қаралды 52 М.
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 896 М.
Elon Musk is Wrong about the F-35
9:50
Ryan McBeth
Рет қаралды 454 М.
What are Interfaces? (C# Basics)
13:54
Code Monkey
Рет қаралды 213 М.
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 14 МЛН