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.
If you're looking to learn how to truncate a string in C#, then you've come to the right place. This article will provide you with the necessary information to accomplish this task efficiently and effectively. Don't waste any more time searching for answers - read on and become a master of C# string truncation today! By Ziggy Rafiq

Static Constructors are a powerful mechanism for initializing static members and performing one-time setup tasks in C# classes.

The spread operator, a recent addition to C# in version 12, streamlines working with collections like arrays and dictionaries. It simplifies tasks such as cloning and merging, enhancing code readability.

Explore methods to split VCF (vCard) files into multiple contacts. Get the best solutions to easily split vCard files into multiple contacts on Windows and Mac.

C# 9.0 introduces Records, aligning with Domain-Driven Design (DDD) principles, especially in modeling value objects. This article explores leveraging Records in DDD with illustrative examples for enhanced domain modeling.

Learn how to handle multiple checkboxes in a GridView within ASP.NET, including scenarios with multiple GridViews, user controls, and master pages. JavaScript functions are provided for checkbox manipulation and regular expression validation. This article addresses challenges with multiple checkbox selections within GridView controls, especially in scenarios involving user controls and master pages. It outlines steps to integrate GridView controls into master and user controls, along with JavaScript modifications for effective checkbox management.

In this article, we will explore techniques for simulating multiple inheritance in C#. Discover how to leverage interfaces, composition, and class hierarchies to mimic this powerful feature, enhancing your object-oriented design skills.

Learn advanced techniques in C# to simulate multiple inheritance. Explore how to effectively combine classes, interfaces, and other features to achieve complex behavior in your programs. Part II of the series dives deeper into inheritance strategies and implementation details.

This approach allows for achieving some level of multiple inheritance-like behavior while avoiding the complexities associated with traditional multiple inheritance.

Ensuring reliable communication between systems is vital. Learn how to implement resilient HTTP requests in C# using Polly for robust, fault-tolerant applications.

C# provides seamless JSON handling with System.Text.Json. Easily parse JSON strings into C# objects and vice versa for efficient data manipulation.

Understanding data types is crucial for effective data manipulation and storage. In this article, we will learn about TINYINT in SQL efficient storage for small integers. In C#, use byte or sbyte for representation. Optimization is crucial.

In C# 10, a new feature called "Implicit Usings" has been introduced. This feature aims to simplify the process of including commonly used namespaces in C# code files.

Master DateTime manipulation in C# with this comprehensive guide. Explore methods like 'Add' and properties for modification, extract components, and learn about rounding and truncating DateTime values for robust applications.

In this article, we will learn about the use of "out var _" in C#, a syntax that allows declaring a variable inline without specifying its type. Learn its purpose, usage, and how it enhances code readability.

Learn how to create custom NuGet packages in C# with this step-by-step guide. Set up a project, add components, create a .nuspec file, package your project, and optionally publish to nuget.org.

In C#, the nameof operator is a relatively recent addition to the language, introduced in C# 6.0. It provides a convenient way to obtain the name of a variable, type, or member as a string.

Explore the often-overlooked issue of the "dangling if-else problem" in programming through our insightful article. We delve into the ambiguity that arises when multiple if-else statements are nested without clear indentation, leading to unexpected behavior and logical errors.

Learn how to create, manipulate, compile, and execute C# expression trees, with examples of building runtime filters for collections.

Learn how to enable and use nullable reference types in C# 10, including nullability annotations, compiler warnings, null checks, and operators for safer code.

Efficiency in programming is vital, and choosing the right method for tasks is crucial. Explore why Any() often outperforms Count() in specific scenarios with illustrative examples in C#.

Discover an automated solution for daily source code backup with ease. This content introduces an executable file designed to streamline the backup process, ensuring your data is safeguarded without manual intervention.

In this article, we will discuss the very controversial and important topic of whether the testing of a private method or private function is ethical.

Explore methods to open OCR files in PDF. Get the best guides to open an OCR file in PDF with easy steps. Open OCR PDF files in C# using the iTextSharp library. Install iTextSharp, write C# code to extract text, and run the code for OCR PDF processing.

Serialization and deserialization are processes used to convert objects into a format that can be easily stored, transmitted, or persisted, and then reconstructed back into objects when needed.

Learn to create objects in C# step-by-step. Define classes, instantiate objects, access members, use constructors, and explore static constructors—master object creation for robust C# applications.

In this article, we will learn about properties in C#, different types of properties, how to define and use them, and some best practices when working with properties in C#, properties in C# are a way to encapsulate data and provide controlled access to it.

Explore methods to open a PSD File without Photoshop. Get the program to open a PDF file without Photoshop using C#.

Explore methods to View or Print CDR Image files with or without CorelDRAW. Get the best guides to View or Print CDR Image files using CorelDRAW and C#.

In this article, you will learn about the nuances of equality comparison in C#, distinguishing between value types (like structs) and reference types (like classes). Understand how the == operator behaves differently for each and ensure accurate comparisons in your code.
Everything on C#, not only its articles: the C# page →
DevSocialUpcoming · 3rd editionAI Agents ConferenceNov 23–27, 2026Live onlineMembers only16days leftRegisterMembers onlyWrite an article and earn +1,000 SHARP when it is approved.
Write an article