dotnet

The new wave: Top 10 emerging .NET content creators

The new wave: Top 10 emerging .NET content creators

Whether you’re diving into .NET best practices, learning about architectural principles, or trying to wrap your head around microservices, there’s always someone willing to break things down in a way that clicks. The wealth of knowledge available in .NET community —from newsletters and blogs to vlogs and technical articles—makes it easier to keep growing and stay current. We’ve grown accustomed to names like Scott Hanselman, Mary Jo Foley, Richard Campbell, and Tim Corey. Influencers that have become staples, not just in social media but also on conference stages, in magazine articles, and beyond. But who are some of the newer…
Read More
Dica C#: Target-Typed New Expressions

Dica C#: Target-Typed New Expressions

Vamos falar sobre Target-Typed New Expressions, uma funcionalidade do C# 9 que torna a inicialização de objetos mais concisa e clara. Veja o exemplo no código abaixo. public class Pessoa { public string Nome { get; set; } public int Idade { get; set; } } public class Program { public static void Main() { Pessoa pessoa = new("João", 30); // Usando Target-Typed New Expressions Console.WriteLine($"Nome: {pessoa.Nome}, Idade: {pessoa.Idade}"); } } Enter fullscreen mode Exit fullscreen mode Explicação:Com Target-Typed New Expressions, você pode omitir o tipo explícito ao criar novos objetos, desde que o tipo possa ser inferido a partir…
Read More
Understanding ArgumentNullException in C#

Understanding ArgumentNullException in C#

What Does "ArgumentNullException" Mean? In layman's terms, an ArgumentNullException occurs when a method expects you to give it something (an argument), but you give it nothing (null). It's like being asked to bring a dish to a potluck dinner, but you show up empty-handed. Real-Life AnalogyImagine you are invited to a potluck dinner. The host asks everyone to bring a dish to share. If you show up without any food, it's like you brought "nothing" to the table. The host might be frustrated because the event relies on everyone contributing. Similarly, when a method expects an argument and you pass…
Read More
Nuke: Deploy ASP. NET Web App to Azure

Nuke: Deploy ASP. NET Web App to Azure

In this post, we will explore the benefits of Nuke and its most common features as we deploy a web app to Azure. Our goal is to achieve a flexible, maintainable, automated build process. Nuke is an open source, cross-platform build automation solution for .NET projects. Nuke prides itself on its simplicity and extensibility that makes build automation approachable for everyone. Today, tools like Continuous Integration Servers perform the same job. So, why should we move the build process from CI Servers to Nuke and use them as simple runners? Reduce Vendor Lock-In: Switching from one CI platform to another…
Read More
How to encrypt Strings in .NET code obfuscation?

How to encrypt Strings in .NET code obfuscation?

The string encryption function enables the encryption of literal string data type values. You can choose to encrypt all strings or mark certain strings for obfuscation. Additionally, you have the option to select a cryptographic method for encrypting the strings. Only the strings specified will be encrypted or obfuscated. Discussing the Skater .NET Obfuscator, it's evident that strings can offer significant hints to anyone attempting to reverse-engineer code, so safeguarding string data is crucial. While it won't stop a determined hacker from decoding the strings and accessing the data, it can hinder an attacker's efforts to crack a licensing routine,…
Read More
Windows Powershall Commands

Windows Powershall Commands

Terminal oynasiga kirish uchun "Windows + r" klavishlarini bosib, chap pastki burchakda chiqgan oynaga "cmd" yozilsa terminal oynasiga kiriladi. "cd desktop" yozib terminal ish stoliga o'tiriladi. "mkdir_yaratmoqchi bo'lgan fayl nomi" yozilsa shu nomli fayl yaratib beradi. 3."cd_yaratilgan_fayl_nomi" yozilsa o'sha faylni ichiga kiradi. 4."cls" - "clear" vazifasini bajarib beradi ya'ni tepada yozilgan hamma narsani tozalab beradi. 5."dir" bilan sizda nechta fayl borligini va falyllar ichida nima borligini chiqazib beradi. 6."dotnet new" yozib dotnetda nima vazifalarni qila olishimizni chiqarib beradi. 7."dotnet new console" yozib yangi console loyiha yaratib olsa bo'ladi. 8."dotnet new console -n yaratmoqchi_bo'lgan_papka_nomi" yozilsa shunday nomli papkani o'zi yaratib beradi.…
Read More
Default interface methods no C#

Default interface methods no C#

Interfaces com métodos padrões se trata da capacidade de adicionar assinaturas de métodos em uma interface com um corpo definido (com um comportamento padrão ou mesmo um corpo vazio) fazendo com que as classes que implementam essa interface não tenham a obrigatoriedade de implementar esse novo método adicionado na interface. Imagine o seguinte cenário genérico: Temos uma interface IAnimal que contém métodos comuns que simulam comportamentos comuns de todos os animais. public interface IAnimal { void MakeSound(); void Eat(); void Sleep(); } Enter fullscreen mode Exit fullscreen mode Temos 3 classes que representam animais terrestres e que implementam a interface…
Read More
Implementing the Cached Repository Pattern in C#

Implementing the Cached Repository Pattern in C#

Cached Repository in C#: An Introductory Article Using the Decorator Pattern and Entity Framework Core Introduction to the Concept of a Cached Repository A cached repository is a design pattern aimed at enhancing application performance by storing data in a fast-access memory area known as a cache. This reduces the number of database accesses, thereby improving response times and the application's scalability. A repository abstracts data access and provides uniform interfaces for CRUD operations (Create, Read, Update, Delete). Combining these concepts offers a powerful method for optimizing data access patterns in modern applications. Importance and Benefits of Using Cached Repositories…
Read More
The Open/Closed Principle in C# with Filters and Specifications

The Open/Closed Principle in C# with Filters and Specifications

Software design principles are fundamental in ensuring our code remains maintainable, scalable, and robust. One of the key principles in the SOLID design principles is the Open/Closed Principle (OCP). This principle states that software entities should be open for extension but closed for modification. Let’s explore how we can adhere to this principle through a practical example involving product filtering. Initial Implementation: The Problem Imagine we have a simple product catalog where each product has a name, color, and size. We need a way to filter these products based on various criteria. A straightforward implementation might look like this: public…
Read More
{IL} –> {Intermediate Language}

{IL} –> {Intermediate Language}

IL (Intermediate Language) .NET’dagi oraliq til boʻlib, MSIL (Microsoft Intermediate Language) yoki CIL (Common Intermediate Language) nomi bilan ham tanilgan. C# yoki VB.NET kabi tillardagi manba kodi to'g'ridan-to'g'ri mashina kodiga emas, balki birinchi navbatda ILga kompilyatsiya qilinadi va bu uni platformadan mustaqil qiladi. Arxitektura mustaqilligi: IL kodi CLR (Common Language Runtime) ning tegishli versiyasi o'rnatilgan har qanday platformada ishlashi mumkin. Bu ishlab chiquvchilarga kodni bir marta yozish va uni turli xil operatsion tizimlar va protsessor arxitekturalarida ishga tushirish imkonini beradi. JIT kompilyatsiyasi: Dastur ishga tushirilganda, IL JIT kompilyatori (Just-In-Time kompilyatori) yordamida mashina kodiga aylantiriladi. Ushbu jarayon maqsadli platformada optimal ishlashni…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.