Learn it from developers who built it.
Tutorials, how-tos and deep dives on AI, .NET, C#, cloud and developer tools, written by the community.

This is a very basic article that will explain a few ways of restricting a decimal value to 2 decimal places in C#.

In this article we will see how to create a single instance of a class using Singleton Pattern.

In this article, I am going to show how we can lock the system automatically using a timer.

There are multiple ways to rename a file in C#. In this article, I'll show you how to rename a file in C# using FileInfo and DOS command.

C# StreamReader is used to read characters to a stream in a specified encoding. Learn how to use C# stream reader. C# StreamReader code example.

In this article, you will learn about the most common interfaces in the C# Libraries that you can use to create robust classes and objects.

In this article, you will learn about producer consumer pattern in C#.

This article will help programmer, developer to overcome the problem as:The AdRotator adRtrCtrl/adRotator1 could not find the AdvertisementFile or the file is invalid.

This article shows how to convert part of an Excel worksheet to an image using the free Spire.XLS API.


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.

In this article, you will learn about C# record type.the article explains the introduction of Record Types in C# 9.0. Record Types are a new feature in the C# programming language, designed to simplify the process of working with immutable data. Traditionally, creating classes to store data involved defining properties, constructors, equality methods, and more. With Record Types, this process becomes much more streamlined.

ADO.NET class libraries are used for accessing data from a wide range of data sources. One of the best features in ADO.Net is DataSet.Even though it was an exciting feature, performance was a concern with DataSet. Lets look some changes made to DataSet in ADO.Net in this article.

Learn how to implement multiple inheritance in C#. Inheritance is one of the key characteristics of an object oriented programming language.

Here you will see why composition is favored over inheritance.

Merging bookmarks of two or more PDF files using iTextSharp involves combining multiple PDF documents into a single PDF file while preserving the bookmarks (table of contents) from each individual PDF. This process allows users to consolidate information from different PDF files while maintaining organized navigation through bookmarks.

Well this article is basically to explain how to make threads run synchronously.

In this article we are going to learn operator overloading, and the basic concepts of operator overloading.

In this article you will learn about the difference between Parallel.ForEach() Vs Foreach() loop in C# language.

There is some application that we want that only single instance of application works at a time. So here in this article is the logic for doing that.

Learn how to use C# 4.0 dynamic arrays to store values of different types and how they compare with object arrays.

Serializing and deserializing objects using BinaryFormatter in C# is a powerful technique for converting complex objects into a binary format for storage, transmission, or deep cloning. This process allows objects to be saved to a file, sent over a network, or stored in a database. This approach enables data persistence and is commonly used in applications that require object state preservation.

With Boxing and unboxing one can link between value-types and reference-types by allowing any value of a value-type to be converted to and from type object. Boxing and unboxing enables a unified view of the type system wherein a value of any type can ultimately be treated as an object.

Polymorphism is a key feature of OOP that lets developers use same name methods in different forms. This tutorial explains basics of Polymorphism in C# with C# Polymorphism code examples.

Custom attributes in C# allow developers to annotate code elements with metadata for improved runtime behavior and information retrieval. This practical guide explores the creation, implementation, and usage of custom attributes in C#. Learn how to define custom attributes, apply them to code entities, and leverage reflection to access attribute information dynamically. Discover the versatility of custom attributes for enhancing code readability, facilitating debugging, and enabling a more efficient software development process. Gain insights into best practices and real-world scenarios for effectively utilizing custom attributes within your C# projects.

In this article we will discuss about how to Read/Write the Lines and Bytes in a file in C#.

In this article I explain how to determine the location of a specified file type in all directories of your computer with the help of C#.

The C# yield keyword signals to the compiler that the method in which it appears is an iterator block. The compiler generates a class to implement the behavior that is expressed in the iterator block.

StreamWriter class in C# writes characters to a stream in a specified encoding. StreamWriter.Write method is responsible for writing text to a stream.

In this article you will learn how to extract data from Barcode and store the data in Excel.
Everything on C#, not only its articles: the C# page →
Write an article and earn +1,000 SHARP when it is approved.
Write an article