C# Corner
Tech
News
Videos
Forums
Trainings
Books
Live
More
Interviews
Events
Jobs
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Tags
No tag found
Content Filter
Articles
Videos
Blogs
Resources
News
Forums
Interviews
Complexity Level
Beginner
Intermediate
Advanced
Refine by Author
[Clear]
Gurpreet Arora(17)
Mahesh Chand(10)
Sean Franklin(4)
Tahir Ansari(3)
Miguel Teheran(3)
Yogeshkumar Hadiya(3)
Bardia Mostafavi(3)
Uday Dodiya(2)
Mominul Islam(2)
Lisa Fusco(2)
Rajiv Singh(2)
Rasul Huseynov(2)
Guest User(2)
Ecco Suprastyo(2)
Sandeep Kumar(2)
Debendra Dash(2)
Gautam Singh(1)
Raghunath Bhukan(1)
Baibhav Kumar(1)
Azer Engazzou(1)
Vitalii Honcharuk(1)
John Godel(1)
Mehdi Rezaie(1)
Maria Joshua Roy(1)
Vipul Malhotra(1)
Abhishek Khandare(1)
Ali Benchaaban(1)
Yuvapriya P(1)
Esamaldin Mohammed(1)
Sardar Mudassar Ali Khan (1)
Jay Krishna Reddy (1)
Alexis Chan Gridel(1)
Nagaraj M(1)
Jin Necesario(1)
Catcher Wong(1)
Željko Perić(1)
Ivan Porta(1)
Ashish Bhatnagar(1)
Miroslav Adamec(1)
Sergey Vasiliev(1)
Sumit Kharche(1)
Amir Ismail(1)
Mohammad Elsheimy(1)
Avnish Kumar(1)
C# Curator(1)
Altaf Ansari(1)
Sibeesh Venu(1)
Prakash Tripathi(1)
Vivek Kumar(1)
Staff Writer(1)
Asma Khalid(1)
Syed Shanu(1)
Nilesh Jadav(1)
Mukesh Kumar(1)
Douglas Miller(1)
Resources
No resource found
Debugging AI-Generated Code: A Guide for Developers
Apr 03, 2026.
With the rise of AI tools like ChatGPT, developers can generate code faster than ever. However, this speed comes with a new responsibility—debugging and validating AI-generated code. This article provides a practical guide to identifying and fixing issues in AI-generated code using real-world C# examples. It covers common pitfalls such as missing validations, edge-case failures, and incorrect business logic. Additionally, it demonstrates how to ensure code reliability through unit testing with xUnit and implements a real-world ASP.NET API scenario. The article emphasizes the importance of developer judgment, testing, and debugging skills in the AI era, ensuring that generated code is not just functional but production-ready.
Top 3 Legit Ways Developers & Students Can Earn in 2026 (No Hype — Real Opportunities)
Jan 02, 2026.
Developers and students can earn in 2026 through real, skill-based and value-driven opportunities. This article explores micro-work, contribution-based earning, and building digital assets — focusing on growth, learning, community and sustainable income.
C# 14- Beyond Methods: Exploring Advanced Extension Member Scenarios
Dec 25, 2025.
Unlock the power of C# 14 extension members beyond basic methods! Discover advanced techniques for cleaner APIs, fluent design, and improved code readability. Elevate your C# skills!
How to Design a Redis Cache Strategy for Scalable Applications (With C# Examples)
Dec 23, 2025.
Learn how to design a production ready Redis cache strategy using cache aside pattern, TTLs, and best practices. Includes real C# examples using Redis for scalable systems.
Return First: A Clean-Code Mindset
Dec 08, 2025.
Clean Code Principles in .NET : Introduce how Return First fits into modern clean code practices and why it matters for .NET developers. Reducing Complexity with Guard Clauses : Explain how guard clauses simplify methods, reduce nesting, and improve readability. Real-World .NET Examples : Provide practical before after code samples from controllers, services, and validation flows to demonstrate the impact. Improving Maintainability and Debugging : Show how early returns make debugging easier and help ensure consistent business rules. When Return-First Should NOT Be Used : Clarify edge cases where early-return might not be ideal important for a balanced, senior level approach.
Mastering Async/Await For Robust And Scalable .NET Apps
Oct 03, 2025.
This article explains how to properly leverage async/await for scalable applications. Learn to avoid common pitfalls like thread pool exhaustion and connection pool bottlenecks. Discover best practices for ConfigureAwait, database connections, and end-to-end async implementation.
CSharp (C#) and Generative AI: From Legacy Visual Studio to Modern Enterprise AI
Sep 21, 2025.
Explore the intersection of legacy .NET systems and modern Generative AI. Learn how C# developers are using prompt engineering to bridge the gap between Visual Studio 2005/2006 and .NET 6/7/8, extending the life of older systems while innovating with AI-driven capabilities. Discover hybrid AI scenarios and the future of C# development.
Master C# from Basics to Advanced | Complete C# Learning Path with Algorithms & Real-World Skills
Aug 17, 2025.
Learn C# step by step! From basics to advanced concepts with 20+ algorithms, OOP, LINQ, async, desktop & web app development.
Building an Invoice Entry System with Angular, ASP.NET Core, Dapper, CQRS, and SQL Server
Aug 12, 2025.
Learn how Vibe Coding revolutionizes retail merchandising by replacing static seasonal plans with AI-powered, multi-agent systems that detect trends, align inventory, adjust pricing, and personalize catalogs in real time.
Hide Column Headers and Show Row Headers in C#
Jul 08, 2025.
Learn how to display DataGridView data horizontally in a WinForms application. This article shows you how to set up row headers, add columns, and rotate data display programmatically.
Google Developer Group, CSharp & HackIndia: Expand Web3 & AI Student Developer Reach in India
Mar 24, 2025.
GDG Partners with HackIndia to expand its reach to student developers across India.
The Object Oriented Programming
Mar 17, 2025.
The Object Oriented Programming (OOP)  improves the scalability and reusability of the code. This comprise of class and objects.
Understanding Context Manager in Python
Mar 15, 2025.
?Python's context managers, implemented via the statement, ensure efficient resource management by automating setup and teardown operations, such as opening and closing files, even when exceptions occur.
CSharp.com Unveils Real-World Web3 Skills Credentialing and Certifications to Empower Developers and Simplify Hiring
Dec 31, 2024.
CSharp.com unveils real-world Web3 skills credentialing and certifications to empower software developers and streamline the hiring process for employers.
Explaning Bucket Sort Algorithm
Oct 21, 2024.
The `BucketSort` class implements the bucket sort algorithm, which distributes elements into buckets, sorts them, and merges the sorted buckets. It's efficient for uniformly distributed data, with potential quadratic complexity in the worst case.
Boyer-Moore Majority Vote Algorithm
Oct 21, 2024.
The Boyer-Moore Majority Vote Algorithm efficiently finds elements appearing more than a fraction of the time in linear time and constant space, using two candidates and counters to track occurrences.
Under The Hood Of Thread Synchronization With LOCK
May 15, 2024.
The LOCK keyword is the most popular mutual-exclusive thread synchronization construct. The LOCK statement in C# is crucial for thread synchronization, preventing race conditions by restricting access to shared resources. Under the hood, it translates to the Monitor class, enhancing code efficiency and reliability.
Introduction to Monitor Class in C#
May 13, 2024.
The Monitor class is built on dotNET’s FCL (Framework Class Library) infrastructure. In general, it provides to achieve thread safety.
Understanding and Managing Server-Side (Output) Caching in .Net
Jan 15, 2024.
IIS employs System.Web.Caching for efficient output caching. Utilize HttpRuntime.Cache.Insert for CRUD operations, specifying key, value, and optional parameters like dependencies, absolute expiration, and sliding expiration for optimization.
Real-Time Paris Metro Crowdedness Forecast: A Proof of Concept with Azure and C#
Jan 08, 2024.
In this article, we will learn about navigating you through crafting a prototype for forecasting crowd levels in Paris Métros using Azure and C#. It covers Azure setup, machine learning, model deployment, streaming pipeline creation, and user application integration.
Exploring Default Lambda Parameters in C# 12
Jan 01, 2024.
Default Lambda Parameters in C# 12.
Constructors in C#
Oct 12, 2023.
In C#, constructors are essential methods responsible for initializing and creating objects within a given class. These functions are invoked when you create an instance of the class. Constructors share the same name as the class and do not have a return type. In C#, there are several fundamental types of constructors.
C# Composite Design Pattern
Sep 26, 2023.
Discover the power of the Composite design pattern in C#, a structural pattern that unifies objects into tree structures, simplifying complex hierarchies for versatile software development.
Unlocking C# Chain of Responsibility Pattern
Sep 25, 2023.
In software design, maintaining the separation of concerns is fundamental. This principle not only enhances code modularity but also ensures each module has a single responsibility. However, as applications grow in complexity, managing the flow of responsibilities can become challenging. This is where design patterns come to the rescue. Among them, the Chain of Responsibility pattern stands out as a robust tool for handling responsibilities in a flexible and decoupled manner.
Proxy Pattern in C#
Sep 22, 2023.
Learn about the Proxy Pattern in C#, a powerful structural design pattern. Explore its purpose, implementation, and real-world applications, enhancing software efficiency, maintainability, and scalability. Happy Learning!
Exploring Decorator Pattern in C#
Sep 21, 2023.
Exploring the Decorator Pattern in C#.the Decorator Pattern stands out as a versatile tool for extending the functionality of classes without altering their structure. In this article, we will delve into the Decorator Pattern and how it can be implemented in C#.
Understanding the Flyweight Design Pattern in C#
Sep 20, 2023.
Explore the Flyweight Design Pattern in C#, a memory-efficient structural pattern. Learn to optimize performance by sharing common properties among objects, improving application efficiency.
Understanding the Factory Design Pattern in C#
Sep 19, 2023.
Understanding the Factory Design Pattern in C#
Custom Exceptions in C#
Sep 19, 2023.
Enhance error handling in C# with custom exceptions. Learn how they provide specificity, control, documentation, and maintainability, and follow best practices for effective implementation.
Adapter Pattern in C#
Sep 19, 2023.
Demystifying the Adapter Pattern in C#: Bridging the Gap Between Incompatible Interfaces
Exploring Anonymous Functions in C#
Sep 18, 2023.
Exploring Anonymous Functions in C#
Private Constructor in C#
Aug 28, 2023.
Explore Private Constructors in C#: Unveiling Their Roles and Significance. Discover how these constructors influence design patterns like Singleton, control object creation, and encapsulate initialization logic for improved C# applications.
Sealed Classes in C#
Aug 28, 2023.
Delve into the significance of sealed classes in C# OOP. Uncover their role in defining code boundaries and inheritance. Gain insights into their benefits, optimizing security and performance. Master the art of using them judiciously for enhanced code predictability and maintainability.
Structs in C#
Aug 28, 2023.
Discover the significance of C# structs - lightweight alternatives to classes. Efficiently manage memory and enhance performance with value types while considering scenarios and pitfalls for optimal implementation.
Building a Bulk Email Sending Console App with NET Core 7.0
Aug 27, 2023.
Building a Bulk Email Sending Console App with NET Core 7.0 entails the creation of a robust and versatile solution tailored to efficiently manage large-scale email distributions. Through a meticulous development process, this application emerges as a vital tool for businesses and organizations seeking an effective way to reach their target audiences.
Delegates in C#
Aug 25, 2023.
Explore the fundamental potency of C# delegates—vital for encapsulating methods as first-class entities. Empower callbacks and event management for efficient C# application development.
Generics in C#
Aug 25, 2023.
Harness the Versatility of C# Generics: Boost Code Reusability and Type Safety. Dive into how Generics empower adaptable, efficient code, accommodating various data types while maintaining robust type checking.
Using SuperConvert.Abstraction NuGet Library for Data Conversion
Aug 23, 2023.
SuperConvert.Abstraction is a powerful library that provides data conversion functionalities for your .NET applications. With this library, you can easily convert between different data formats, such as JSON, CSV, and XLS, using a simple and intuitive API. The library also introduces a new Dependency Injection (DI) service to streamline the usage of its features.
Document Viewer Capabilities in ASP.NET Core 7.0
Aug 20, 2023.
Learn how to integrate, customize, and make the most of the new capabilities for seamless document viewing and interaction within your web applications.
Constant Interpolated Strings in C#
Aug 18, 2023.
Explore interpolated strings in C#, a powerful feature for expressive string formatting. Learn about constant interpolated strings introduced in C# 10, enhancing readability and performance. Understand benefits, use cases, and considerations for improved code quality and maintainability.
Understanding Numeric IntPtr and UIntPtr in C#
Aug 18, 2023.
Discover the importance of IntPtr and UIntPtr in C# programming. Learn how these types facilitate memory management, pointer arithmetic, and interop with native libraries, ensuring efficient and safe practices.
What is Delegates in C# .NET?
Aug 12, 2023.
Delegates in C# act as method pointers, enabling dynamic invocation of methods. They enhance code modularity and flexibility, finding use in event handling, callbacks, and asynchronous programming.
What is new in C# 12?
Aug 08, 2023.
Let’s explore the new features in C# 12 with .NET 8 and how we can use it.
Flurl API Integration Tutorial for ASP.NET Core Web API with Advanced Concepts
Jul 31, 2023.
Flurl is a popular and easy-to-use library for working with HTTP APIs in .NET applications. It provides a fluent API for building and sending HTTP requests, as well as handling the responses in a convenient way.
Early Return Pattern in C#
Jul 28, 2023.
We will have an overview of the early return pattern and some examples in C#
Avoiding Common C# Coding Mistakes - Do's And Don'ts To Remember
Apr 06, 2023.
Here I'm explaining about the common mistakes that we must avoid while performing coding
Back to Basics - How And Why Learning C# Programming Language
Feb 13, 2023.
This article is the very first of the "Back to Basics" playlist, its goal is to bring the basic knowledge to start developing with the C# language. Whether you are an experienced developer of another language such as Rust, C++, or you are a beginner looking to design applications with dotnet technologies, or even games with Unity.
Manage Global Usings In C#
Oct 22, 2022.
In this article, we will learn about the keyword "global" which is introduced in C# 10.0.
Log4Net And .NET Core
Sep 06, 2022.
Using Log4net in .NET Core 6 using a console application.
Filtering In Datagridview In Vb.Net And Also In C#
Aug 02, 2022.
Filtering In Datagridview In Vb.Net and also In C#. When you type in textbox based on in gridview, data will be filtered and also highlighted.
Another Tool For Analyzing RDB Files Of Redis
Jul 27, 2022.
This article introduces an RDB analysis tool based on c# and explains its basic usage and how to customize it.
Symmetrical Repository Pattern - Data Access Made Easy In .NET
May 09, 2022.
In this article, I will describe an interesting pattern that can be implemented to make it trivial to perform CRUD/RESTful data access across a full-stack .net system, with this technique that abstracts away the boilerplate.
How To Wrap Words In DataGridView Cell
Apr 26, 2022.
This article explains how to wrap words inside data grid view cell, and change cell height while typing in text.
Picking Between Blazor Server And Blazor WebAssembly
Feb 07, 2022.
In this article, I will describe key differences between Blazor Server and Blazor WebAssembly, and what you should consider when deciding between project types.
Directory 📁 Handling In C#
Dec 09, 2021.
In this article we are going to see Directory handling in c#. In this article we are see all the operation which we can perform in directory.
Blazor - JavaScript Isolation (ES6 Modules & Blazor)
Nov 15, 2021.
In this article, we will learn how to isolate JavaScript to an individual Blazor Component.
Behavioral Design Patterns In C#
Nov 07, 2021.
Tutorial about Behavioral Design Patterns in C# in simple words.
C# Evolution
Nov 04, 2021.
A short journey in C# history.
Structural Design Patterns In C#
Oct 28, 2021.
In this article, you will learn about structural design patterns in c# in simple word.
Creational Design Patterns In C#
Oct 27, 2021.
Tutorial about Creational Design Patterns in c# in simple word.
SharePoint Site Templates
Jun 29, 2021.
In this article, you will learn about SharePoint Site Templates.
🔄 C# 9.0 Features And C# 10 Expectations
Jun 24, 2021.
The latest version of C#, 9.0, was officially released in November 2020. These days there are already rumors of the features of the future version, C# 10.
Decompiling In .NET For Dummies🤓
Jun 14, 2021.
Do you want to learn how easy it is to decompile a .NET application? ??
The Use Of DataGridView Class In .NET
Mar 27, 2021.
In this article, you will learn about the use of DataGridView class in .NET.
DefaultAzureIdentity And Its Various Credential Types
Jan 05, 2021.
This article shows various ways to retrieve an Azure identity from an application context using Azure.Identity.
CRUD Operation In C# Windows Application Using Store Procedure
Nov 16, 2020.
This guide explores implementing CRUD operations in a C# Windows Forms application using stored procedures. Learn to connect to SQL Server, execute stored procedures, and handle data efficiently.
Check How You Remember Nullable Value Types - Let's Peek Under The Hood
Nov 09, 2020.
In this article, you will learn to check how you remember nullable value types. Let's peek under the hood.
How To Easily Create Azure Functions Using Azure Portal
Sep 06, 2020.
Learn to effortlessly build Azure Functions via Azure Portal. Explore serverless computing, diverse triggers like HTTP or Timer, bindings for seamless data integration, and easy deployment. Monitor, scale, and manage costs conveniently within your Azure subscription.
DotVVM Controls - GridView
Jul 27, 2020.
This article gives an introduction to DotVVM GridView Control.
Upload Image, Save In Database, And Show In Gridview
Jul 16, 2020.
In this article, I will tell you how to save an image in your local directory, save its path in a database, and also show that image in grid view column in ASP.NET.
Using Declarations In C# 8
Jun 22, 2020.
In this article I will explain the syntax feature "using declarations" introduced in C# 8 and how this feature can reduce code noise.
C# Export to Excel from Datagridview
Feb 25, 2020.
In this article, you will learn about a C# export to Excel from datagridview.
Matrix Multiplication In C# - Applying Transformations To Images
Feb 23, 2020.
Today I will show you my implementation of matrix multiplication C# and how to use it to apply basic transformations to images like rotation, stretching, flipping, and modifying color density.
Load Datagridview from a Database in C#
Feb 20, 2020.
In this article, you will learn how to load Datagridview from database in C#.
NSwagStudio - Generate C# Client Code Of ASP.NET Core Web API 😍
Feb 10, 2020.
Learn how to effortlessly generate C# client code for ASP.NET Core Web API using NSwag. Simplify API consumption without manual HttpClient setup. Compatible with various .NET platforms.
What is a Jagged Array In C#?
Nov 04, 2019.
Arrays in C# are one of the most used data types. In this post you can learn what jagged arrays are and how to use jagged arrays in C#.
What Is C#
Jul 08, 2019.
In this article, you will learn about what C# is and what kind of software applications we can build using C# language.
C# StreamWriter Example
Jun 09, 2019.
StreamWriter class in C# writes characters to a stream in a specified encoding. StreamWriter.Write method is responsible for writing text to a stream.
How to write to a text file in C#
Jun 04, 2019.
Learn how to write to a file in C# using the StreamWriter and File classes.
C# Try Catch Statement
May 24, 2019.
C# Try Catch. The try..catch statement in C# is used in exception handling. In this article, I'll explain the use of try-catch in a .NET application including try-catch-finally and try-catch-finally-throw.
C# Regex Examples (2023)
May 22, 2019.
C# Regex represents regex in C#. Here are the top 7 C# Regex code examples.
C# Index Type
Jan 21, 2019.
In this article, you learn how to use the Index type in C#. The Index type is used to index collections and arrays. It provides a way to specify indices relative to the end of a collection, making it easier to work with data structures, especially when you want to access elements from the end without having to calculate the exact index manually.
Top 7 C# Enum Code Examples
Oct 31, 2018.
List of top questions and answers on C# enums.
Convert Byte Array To String In C#
Sep 14, 2018.
Learn to convert a C# byte array to a string in C# and .NET Core. Code example included.
TripleDES Encryption In C# And .NET Core
Sep 04, 2018.
TripleDesCryptoServiceProvider class provides the functionality of TripleDES algorithm. This article demonstrates how to use TripleDesCryptoServiceProvider class to apply DES algorithm to encrypt and decrypt data in .NET Core and C#.
Dynamic Search In DataGridView
Nov 30, 2017.
This article will help you to understand the Dynamic Search method in DataGridView in C#.Dynamic searching in a DataGridView involves implementing a feature where users can search for specific data within the DataGridView in real-time, and the DataGridView updates to show only the rows that match the search criteria. This is commonly used to quickly filter and find specific information within large datasets displayed in a DataGridView control in a Windows Forms application.
LINQ Basic To Advanced - MVC Demo Application
May 16, 2017.
Here, in this post, we are going to see some basic and advanced LINQ queries
Working With Value Tuple In C# 7.0
Mar 21, 2017.
ValueTuple was introduced in C# 7.0. In this article, you will learn how to use a ValueTuple in C#.
Async and Await in C#
Feb 22, 2017.
Basics of C# async await. In this article, you'll learn what C# async and C# await keywords are and how to use async and await in C# code.
Tuples In C#
Jan 05, 2017.
C# tuple is a new data type. Learn how to use tuples in C#.
Display Data In A DataGridView C# 6
Mar 29, 2016.
The sample example show you how to use DataGridView to display data in a grid format.
ASP.NET MVC 5: Datatables Plugin Server Side Integration
Mar 13, 2016.
Learn to integrate Datatables plugin with ASP.NET MVC 5 for server-side data management, searching, sorting, and pagination. Discover how to overcome challenges transitioning from classic ASP.NET webforms to MVC paradigm, enhancing web development productivity and user interactivity.
Display Data In DataGridView Using Entity Framework
Dec 27, 2015.
In this article I am explaining how to work with Entity framework to display the data in DataGridView.
Work With LINQ To SQL
Dec 24, 2015.
In this article I am explaining the steps to work with LINQ to SQL for displaying the data in DataGridView.
DataGridView CRUD With Saving Image to SQL Server using C#
Dec 04, 2015.
In this article you will learn how to perform DataGridView CRUD with saving image to SQL Server using C#.
Insert Images In DataGridView In Windows Application Using C#
Oct 25, 2015.
In this article, I will show you how to insert images into DataGrid in Windows Application using C#.
Delete Multiple Records From A DataGridView Using CheckBox In Windows Form
Oct 22, 2015.
In this article you will learn how to delete multiple records from a DataGridView using CheckBox in windows Form.
Real Time Use Of Context Menu Strip In Windows Form Application
Oct 18, 2015.
Learn how to use ContextMenuStrip in a Windows Forms application to delete records from a DataGridView. This tutorial covers setting up a context menu, handling right-click events, and executing a delete operation with SQL.
All About Var And Dynamic Types In CSharp
Oct 15, 2015.
In this article, we will learn how to use var and dynamic types in C#.
CSharp Code For Making a Double Entry General Ledger Posting (Method 1)
Oct 15, 2015.
In this article we will learn about a C# Code for making a Double Entry General Ledger Posting (Method 1).