Mina PêcheuxinC# Programming·Apr 26Member-only3 C# keywords you need to knowTime to brush up on your C# toolbox! — As a developer, you quickly learn that the best way to keep your programming good is constantly have it grow and evolve by incorporating new tips and techniques. And, to me, C# is one of those languages where you can constantly discover a new hidden feature that suddenly brightens your…Csharp6 min readCsharp6 min read
Kenji Elzerman·Apr 27Caching In C#Caching is a concept used for many years. Caching is everywhere, even on the page you are reading right now. It’s even the most used pattern in software development. There are different ways of creating and managing a cache, but this tutorial will focus on how to use in-memory caching…Csharp9 min readCsharp9 min read
Martynas Samuilovas·Mar 8Member-only7 Awesome Tools for .NET DevelopersBenchmark The Benchmark nuget package allows developers to measure the performance of their code, identify bottlenecks, and optimize for faster execution. It offers an easy-to-use API, supports various scenarios, and provides advanced features like automatic warmup and statistical analysis. It’s essential for optimizing code performance in any development project. Example: …Programming4 min readProgramming4 min read
Dev·edium·Apr 13Member-onlyDateTime in C#: Tips, Tricks, and Best PracticesA Comprehensive Guide to DateTime in C# A Quick Look In C#, the DateTime structure is used to represent and manipulate dates and times. It provides methods and properties to perform various operations on date and time values. Here's a quick overview of how to work with DateTime in C#: //Create a DateTime…Csharp14 min readCsharp14 min read
Sasha MathewsinGeek Culture·Apr 27, 2021Member-onlyHow to Concatenate Objects in C#?Not just strings. — String concatenation is a very simple operation that allows you to join multiple strings together. The usual way to do this is to use the ‘+’ operator: string greeting = "Hello, " + "World!"; Additionally, there are several other ways to concatenate strings: using Join, Concat, Format methods of string…Programming2 min readProgramming2 min read
Mohsen Rajabi·Apr 28How to Start an Advanced .NET Project in 2023We are not talking about project architecture in this article. This article is regardless of what architecture your project has (clean architecture, vertical slice, Nlayer, Hexagonal architecture,…). In this article, we discuss the best practices and tools to start a .net project in 2023. We also learn how to use tools…Best Practices6 min readBest Practices6 min read
Arnold AbrahaminCodeX·Apr 22Member-onlySay Goodbye to Null Checks in C# and Unleash Your Full Potential! 🚀Null seems a necessary recovery, but there are better options — Eliminating null checks and cyclomatic complexity are two ways to eliminate bad code. Both were introduced in my article “How Returning NULL Leads to Snitchy Bugs and How to Prevent Them.” This article is about what to use instead when your inner voice tells you to return null. It is…Dotnet5 min readDotnet5 min read
Yohan MalshikainEnlear Academy·May 12Building a Dynamic Logical Expression Builder in C#Understanding How to use And and Or Operators with Expression Trees — As a C# developer, you may have come across scenarios where you need to build complex logical expressions dynamically based on user input or other dynamic factors. In such cases, building expressions statically can become tedious and error-prone. In this article, we’ll explore how to use expression trees to build…C Sharp Programming6 min readC Sharp Programming6 min read
Alex Maher·Apr 24Member-only10 Mind-Blowing C# HacksHey there! As a passionate C# developer myself, I’ve always been on the lookout for ways to level up my coding skills. I’m excited to share with you some mind-blowing hacks and insights that have helped me become a better programmer. So, grab a cup of coffee, and join me! 1. Using Caller Information Attributes for Better Debugging and Logging …Programming12 min readProgramming12 min read
Juan Alberto España GarciainByteHide·Apr 17Member-onlyC# 12 is Coming! 3 Features that will Blow your Mind 🤯Oh, get ready for some good news! Microsoft’s gone and added a bunch of shiny new features to C# 12 Preview. In this post, we’re gonna dive right into these cool new features. So, let’s go! Primary constructors for non-record classes and structs This is the first feature of the C# 12 Preview. This feature can help…Csharp3 min readCsharp3 min read
Atakan Korez·Mar 29Bye Bye Swagger and Postman — Built-in Rest Client of VS 2022Today, I’m going to talk about a new VS 2022 built-in feature that I recently discovered and found quite interesting. This feature was introduced with version 17.5 and you must update your VS 2022 to version 17.5 to use it. It called .http file(also you can use .rest version of…Swagger4 min readSwagger4 min read
Atakan Korez·Mar 23Smart Enums in C#Introduction Smart Enums, as a feature you can use in C#, can help make your code more readable and understandable. Traditionally, an enum type is simply a data type containing a set of constant values. However, Smart Enums add additional functionality to the enum type. …C Sharp Programming6 min readC Sharp Programming6 min read
Alex Maher·Mar 15Member-only10 powerfull hidden features of C#ValueTask A novel addition to the .NET Core framework is the ValueTask, which can optimize the execution of asynchronous code, elevating its performance. ValueTask bears resemblance to a Task, however, it is a value type, contrary to Task which is a reference type. …C Sharp Programming5 min readC Sharp Programming5 min read
Gabriel Ribeiro Guerra·Feb 13Enhancing your EF Core insert performanceIn this article, we are going to improve our insert performance when dealing with large lists on Entity Framework Core. Have you ever struggled with insert performance when it comes to a considerable amount of data while using Entity Framework Core? If the answer is yes, then you should read those steps bellow and you may speed up your operations up to 5 times! How is this possible? We are going to use a…Programming5 min readProgramming5 min read
Anton Skuratovich·Feb 18Exception Handling in ASP.NET Core Web API with problem details serviceThe problem details service was added in .NET 7.0, which supports creating Problem Details for HTTP APIs. What is the ProblemDetails Class and how to work with it can be read here. A rather large article has been published on the Microsoft website on how the problem details service can…Dotnet3 min readDotnet3 min read
Amrelsher·Feb 5Refactoring away from throwing exceptions in c#let’s see the simple example and show what is the problem This example is very simple to CreateEmployee and saves in the database but before add in the database we should validate the name of the Employee, problem here The validate name method is dishonest (you can’t know the outcome…Csharp3 min readCsharp3 min read
Megha Prasad·Feb 9Attributes and Decorators in C#Attributes and decorators, which allow you to attach metadata to classes, properties, and methods. Attributes Attributes in C# allow you to attach metadata to your classes, methods, and other code elements. This metadata can then be used at runtime to modify the behavior of your code. …C Sharp Programming3 min readC Sharp Programming3 min read
Alex Maher·Feb 12Unleashing the Power of .NET 7: Here what‘s newMicrosoft’s .NET framework continues to soar to new heights with its latest update, .NET 7. Packed full of new features and enhancements, it promises to revolutionize the way developers build applications. From the harmonious combination of Blazor and .NET MAUI to create the hybrid Blazor Hybrid, to the ability to…Software Development4 min readSoftware Development4 min read
Farhan TanvirinJavaScript in Plain English·Jan 11Member-only7 Useful Angular Libraries You Should Use in Your Next ProjectPower up your Angular development — Why write custom functionality when we can easily achieve the same result by using a library? A developer’s best friends and lifesaver are libraries. I believe a good project makes use of some of the best libraries available. Angular is a component-based framework that will help you to build scalable…Angular5 min readAngular5 min read
Muhammad Khoirudin·Jan 4Exception Using Try Catch Best Practice in C#During developing application such as web, desktop, mobile it’s a quite complex because not only the features run but also need to deal with several errors like an exception. Especially if we have to develop background service, unlike web application that will show pop up error or able to debug…Try Catch5 min readTry Catch5 min read