Blog

Page 827 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for Converting string to byte array in C#
c#string

Converting string to byte array in C#

Published on September 2, 2023

# Converting string to byte array in C# - A Complete Guide šŸ”¢šŸ’¬ So, you're facing a problem while converting a string into a byte array in C#. Don't worry, we've got your back! In this guide, we'll address common issues and provide easy solutions to help

Cover Image for Does C# have extension properties?
c#properties

Does C# have extension properties?

Published on September 2, 2023

# šŸ¤” Does C# have extension properties? If you've ever wondered if C# has extension properties, you're not alone! This question can be quite puzzling, especially for those who are familiar with extension methods in C#. In this blog post, we'll dive deep

Cover Image for When to use .First and when to use .FirstOrDefault with LINQ?
c#.net

When to use .First and when to use .FirstOrDefault with LINQ?

Published on September 2, 2023

# When to Use .First and When to Use .FirstOrDefault with LINQ? Are you confused about when to use `.First` and when to use `.FirstOrDefault` with LINQ? You're not alone! Many developers struggle with understanding the differences and knowing which one to

Cover Image for How do you sort a dictionary by value?
c#dictionary.netsorting

How do you sort a dictionary by value?

Published on September 2, 2023

šŸ“š Blog Post: How to Sort a Dictionary by Value in Python Are you struggling to sort a dictionary by value? Sorting dictionaries can be a challenging task, especially when you want to order them based on their values instead of their keys. But worry not,

Cover Image for If a folder does not exist, create it
c#directory

If a folder does not exist, create it

Published on September 2, 2023

šŸ“šŸ†• How to Create a Folder if it Doesn't Exist šŸ“‚šŸ†— So, you want to save a file to a specific folder using the FileUploader control, but what if that folder doesn't exist yet? No worries, I've got you covered! In this blog post, we'll explore a simple ye

Cover Image for How do I convert struct System.Byte byte[] to a System.IO.Stream object in C#?
arraysc#.netstream

How do I convert struct System.Byte byte[] to a System.IO.Stream object in C#?

Published on September 2, 2023

🌟 Convert byte[] to Stream: A Guide for C# Developers 🌟 Are you a C# developer struggling with converting a struct System.Byte byte[] to a System.IO.Stream object? Don't worry, you're not alone! Many developers face this issue when working with binary d

Cover Image for Reading settings from app.config or web.config in .NET
c#.net

Reading settings from app.config or web.config in .NET

Published on September 2, 2023

# Reading settings from app.config or web.config in .NET: A Complete Guide šŸ“œ Welcome to our tech blog! Today we are going to tackle a common issue in .NET development: reading settings from the `app.config` or `web.config` files. šŸŽÆ Whether you're workin

Cover Image for String representation of an Enum
c#enums

String representation of an Enum

Published on September 2, 2023

# String Representation of an Enum: Simplifying Enum Values šŸ” šŸ’”šŸ“Š Have you ever encountered the problem of needing the actual word representation of an enum value instead of its underlying ID? If so, you're not alone! The good news is that there is a sol

Cover Image for How do I use Assert to verify that an exception has been thrown with MSTest?
assertc#unit-testing

How do I use Assert to verify that an exception has been thrown with MSTest?

Published on September 2, 2023

# šŸŽÆ How to Use Assert to Verify That an Exception Has Been Thrown with MSTest If you're using MSTest (Microsoft.VisualStudio.TestTools.UnitTesting) for your unit tests, you might have come across the need to verify that an exception is thrown in your cod

Blog | Matheus Mello