Blog

Page 834 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for Try-catch speeding up my code?
c#.nettry-catch

Try-catch speeding up my code?

Published on September 2, 2023

๐Ÿš€ Title: "Boost Your Code with Try-Catch: Unveiling Surprising Speed Improvements" Introduction: ๐Ÿ‘‹ Hey there, tech enthusiasts! Have you ever wondered how try-catch blocks affect the speed of your code? We've got some exciting insights to share with you

Cover Image for Calling the base constructor in C#
c#constructorinheritance.net

Calling the base constructor in C#

Published on September 2, 2023

๐Ÿ“ **Calling the Base Constructor in C#** Have you ever found yourself in a situation where you've wanted to pass something from the constructor of your inherited class to the constructor of the base class in C#? ๐Ÿค” Fear not! I'm here to guide you through

Cover Image for Type Checking: typeof, GetType, or is?
c#typeoftypes

Type Checking: typeof, GetType, or is?

Published on September 2, 2023

## Type Checking: `typeof`, `GetType`, or `is`? ๐Ÿค” Have you ever been in a situation where you needed to check the type of an object in your code? ๐Ÿ•ต๏ธโ€โ™‚๏ธ It's a common scenario, and there are multiple ways to achieve it. But which one should you use? ๐Ÿค” L

Cover Image for Is there a reason for C#"s reuse of the variable in a foreach?
c#foreachscope

Is there a reason for C#"s reuse of the variable in a foreach?

Published on September 2, 2023

# Why Does C# Reuse the Variable in a `foreach` Loop? ๐Ÿ”„ Have you ever come across a situation in C# where your `foreach` loop behaves unexpectedly? Maybe you've noticed that all the items in your loop are being processed based on the final value of a var

Cover Image for Proper use of the IDisposable interface
c#.net

Proper use of the IDisposable interface

Published on September 2, 2023

# ๐Ÿงน The Proper Use of the IDisposable Interface Do you find yourself puzzled when it comes to the proper use of the `IDisposable` interface? You're not alone! Many developers share your confusion. But fear not, my friends, for I am here to demystify this

Cover Image for What do two question marks together mean in C#?
c#

What do two question marks together mean in C#?

Published on September 2, 2023

# The Mysterious Double Question Marks in C#: Unraveling the Mystery ๐Ÿ‘€๐Ÿ” When it comes to coding, it's not uncommon to encounter cryptic symbols and operators that leave us scratching our heads. One such puzzling sight is two question marks (??) placed t

Cover Image for What is a NullReferenceException, and how do I fix it?
c#.netnull

What is a NullReferenceException, and how do I fix it?

Published on September 2, 2023

# What is a NullReferenceException, and how do I fix it? ๐Ÿ˜ฑ๐Ÿ”๐Ÿ”ง Have you ever encountered the dreaded `NullReferenceException` while coding? Whether you're a beginner or a seasoned developer, this error can be quite frustrating. Fear not, for I'm here to

Cover Image for AddTransient, AddScoped and AddSingleton Services Differences
c#

AddTransient, AddScoped and AddSingleton Services Differences

Published on September 2, 2023

# ๐Ÿ’ฅ AddTransient, AddScoped and AddSingleton Services Differences Explained ๐Ÿ’ฅ So, you've stumbled upon the intriguing world of Dependency Injection in ASP.NET Core, and you're trying to figure out the difference between `services.AddTransient` and `serv

Cover Image for How do I remedy "The breakpoint will not currently be hit. No symbols have been loaded for this document." warning?
c#debugging.net

How do I remedy "The breakpoint will not currently be hit. No symbols have been loaded for this document." warning?

Published on September 2, 2023

# ๐Ÿ› ๏ธ How to Fix "The breakpoint will not currently be hit. No symbols have been loaded for this document." Warning Are you frustrated with the warning message "The breakpoint will not currently be hit. No symbols have been loaded for this document." whil

Blog | Matheus Mello