Blog

Page 475 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for Order of items in classes: Fields, Properties, Constructors, Methods
c#.net

Order of items in classes: Fields, Properties, Constructors, Methods

Published on September 2, 2023

# The Ultimate Guide to Ordering Items in C# Classes šŸ“ƒ ## Introduction šŸ‘‹ Ordering the items in your C# classes is not just a matter of personal preference or aesthetics. It can greatly impact the readability, maintainability, and overall organization o

Cover Image for How do I properly clean up Excel interop objects?
c#excel

How do I properly clean up Excel interop objects?

Published on September 2, 2023

šŸ“ **Tech Blog Post: Properly Cleaning up Excel Interop Objects** Hey there tech enthusiasts! Are you struggling with cleaning up Excel interop objects in your C# code? šŸ¤” Don't worry, you're not alone! Many developers face similar issues, but fear not, a

Cover Image for "use database_name" command in PostgreSQL

"use database_name" command in PostgreSQL

Published on September 2, 2023

# Connecting to a Different Database in PostgreSQL: The "use database_name" Command šŸ”Œ Are you a beginner to PostgreSQL? šŸ¤” Are you struggling to find the equivalent of the "USE" command in MySQL or MS SQL Server? 😟 Don't worry, you're not alone! Many Po

Cover Image for How to convert Decimal to Double in C#?
c#decimalfloating-pointtype-conversion

How to convert Decimal to Double in C#?

Published on September 2, 2023

# Converting Decimal to Double in C#: A Simple Guide 😊 So, you're trying to assign a decimal variable to a double variable in C#, but you keep encountering the annoying "Cannot implicitly convert type decimal to double" error. Fret not! In this blog post

Cover Image for Setting Authorization Header of HttpClient
c#

Setting Authorization Header of HttpClient

Published on September 2, 2023

# Blog Title: šŸš€ Decoding the Mystery: Setting Authorization Header of HttpClient ## Introduction Are you struggling to set the Authorization header of HttpClient for your REST API? Don't fret! In this blog post, we'll dive into the common issues and pro

Cover Image for LINQ Aggregate algorithm explained
aggregatec#.net

LINQ Aggregate algorithm explained

Published on September 2, 2023

# 🧐 Understanding LINQ Aggregate Algorithm: A Simple and Comprehensive Explanation šŸ“ Have you ever found yourself scratching your head when trying to understand the `Aggregate` algorithm in LINQ? šŸ˜• Trust us, you're not alone! Many developers struggle t

Cover Image for How to get the type of T from a member of a generic class or method
c#generics.net

How to get the type of T from a member of a generic class or method

Published on September 2, 2023

# How to Get the Type of T from a Member of a Generic Class or Method šŸ˜Ž So you're working with a generic class or method and you want to know what type the generic parameter `T` represents? Fear not, my friend, for I have the solution you seek! šŸš€ ## Th

Cover Image for IEnumerable vs List - What to Use? How do they work?
c#list

IEnumerable vs List - What to Use? How do they work?

Published on September 2, 2023

# :rocket: IEnumerable vs List - What to Use? How do they work? Ever wondered about the difference between `IEnumerable` and `List` in C#? šŸ¤” Don't worry, you're not alone! These two types can be quite confusing, especially when it comes to their usage an

Cover Image for Split a string by another string in C#
c#.netsplitstring

Split a string by another string in C#

Published on September 2, 2023

šŸ”Ŗ Split a string by another string in C# šŸ”€ Have you ever tried splitting a string in C# using the `Split()` method, only to realize that it only works with individual characters as the delimiter? šŸ¤” Don't worry, you're not alone! Many developers have fa

Cover Image for Random number generator only generating one random number
c#random

Random number generator only generating one random number

Published on September 2, 2023

šŸŽ² Why is my random number generator only generating one random number? šŸŽ² So, you've got this funky random number generator that's supposed to give you different values each time you use it. But when you use it in a loop, all the values end up being the