
In this section we will explain the implementation of the solution described so far. General formatter is a class implementing IFormatProvider and ICustomFormatter interfaces. This is proposed method to implement formatters in .NET.

In this article we will see the examples of using custom formatter when applied to different objects of different complexities. Custom formatter produces output which is most appropriate for each of the objects supplied.

Explains the design of a general C# object formatter, including configurable layout, recursive member formatting, arrays, and IEnumerable collections.

In this article we will deal with the problem of formatting. We will address the question how to build a string which represents object of unknown structure and contents. This question is opposed to typical situation in which programmer formats the string which represents object of known structure, and hence contents of the string can reflect object’s semantics in their proper ways.
In this article we are going to demonstrate design techniques which can be used to produce such Web service. Solution which will be developed along the course of this text is for demonstration purpose only and cannot be applied to practical, real world problems as is. But we hope that methods used to develop it can be applied to much more complex cases.
Learn how to wrap blocking, non-thread-safe C# objects so UI code remains responsive, can report progress, and can handle cancellation during lengthy operations.

In this article we are presenting classes which can be used to formalize the string comparison. Applications can offer several comparison methods and then let the caller decide which one to use in every call to a function. Classes shown in this article can help build such functionality almost without effort.
Here the use of fishhook relation to represent tree structures is explained through a detailed example in T-SQL.

In this article we shall cover one common problem in textual data processing and that is how to match strings against patterns that may contain wildcard characters.

This article continues the analysis by posing a very high goal - attempting to subscribe handlers to events which are completely unknown at compile time. As will be shown, CLR does not support such intentions and specific approach must be employed to solve the problem.

Learn how to audit .NET event notifications in their raised order by inspecting event handlers and EventHandlerList-based event storage.

In this article we shall demonstrate how this problem can be resolved. Generally, .NET Framework does not provide a solution to the problem and what follows here is based on its undocumented features. So take the solution proposed below with caution.

This article covers several situations that occur in practice when coding event driven applications. Pitfalls and bad designs are outlined and examples of proper event handling are given.

Learn how FlowLayoutPanel uses control margins to calculate positions and preferred size in top-down Windows Forms layouts.

This article explains, and demonstrates through a relatively complex example, proper way of calculating MinimumSize property value at runtime. Result is that all controls can be rendered without loss caused by insufficient size of their parent controls.

In this article we will first pass from simple to more complex cases which programmers might encounter in practice and then provide a full scale solution to the problem of maintaining AcceptButton and CancelButton properties in form of ready-to-use set of classes. Finally, we will provide an example which demonstrates how simple it is to use these classes.

This article provides ready-to-use solutions to the problem and explains several examples where a proposed solution proves to be useful in practice.

When coding a document editing application, maintaining scrollbars is a task that must be done correctly to have an accurate and responsive document viewer. This article gives precise instructions how to calculate values of different scrollbar attributes so that scrolling functionality is coded correctly.

This article discusses several ways in which Windows Forms ComboBox control can be populated when DropDownList style is used. Some of the methods are discouraged, some highly appreciated, all depending on the way in which objects are mapped to strings shown in the ComboBox drop list.
This article which explains several aspects of the .NET String class internal structure. Examples and workarounds are given for three distinct manifestations of a reported bug related to the TextRenderer.MeasureText function used with PathEllipsis and ModifyString flags.
This article will show you XML serialization, so simply added in code, is not a magical stick. Serialization must be planned in full detail when working with complex classes, rather than expected to work by itself. Loss of planning work leads to redesign work later on, when maintaining serialization of original classes becomes too expensive or even hits the limit after which serialization of original classes is not possible without loss of data.
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegisterMembers onlyWrite an article and earn +1,000 SHARP when it is approved.
Write an article