Skip to content

CategoryC#

Articles on C# programming language.

Dotnet Debug Tracing Components

C# Tracing & Event Logger Explained

In this article, we will learn how to push C# debugging information into the Trace File and Windows Event Logger. This is useful when the application is deployed in the customer place. Debugging an application in customer place is almost not possible as we do not keep the source code in the deployed environment.
The screen-shot below shows our Example and you can download it from the link at the bottom of this article. Here, we will not explore how the application performs prime number summation. But, will learn how to perform tracing using the C# Application Programming Interface.

Debugging Windows - Immediate Window

Debugging Windows in C# Explained

Microsoft Visual Studio provides various debugging windows to make the developer’s life easy when they analyzing the code for fixing logical bugs or crashes. In this example, we will use the sample application to learn various debugging windows autos, locals, call-stack, output and immediate.

The BreakPoint Window

Breakpoints & CSharp Application Debugging

Debugging is the process of finding the logical errors in the program by checking the source code during the execution. The execution of a program pauses when the break-point is hit. Here, I will walk you through the debugging using the sample EXE found with this article. We will start breaking the execution with Breakpoints, then we will see step-in and step-out options. Finally, we see how to add a conditional breakpoints.

Setting Conditional Compilation For CSharp Project

FAQ on C-Sharp Project Properties

A C-Sharp Developer must know various project properties and how it impacts the projects. In this example, we create some sample projects and examine various c-sharp project properties. This is useful for all c-sharp developers.

How Single Call Server Activated Object Works

Single-Call Remoting (Server Activated)

‘Dotnet Remoting’ is a client and server based distributed object technology. In this article, we will make two applications. One is a Remote Server, and another one is a Client. First, we will complete the Server application and then carry out with the client. Here, we create Single Call remote. You will learn more about it in this article.

StreamReader StreamWriter Example

StreamReader and StreamWriter Explained

The C# StreamReader and StreamWriter classes are useful to Read or write a text file. This example makes you understand these two classes along with the need to learn about OpenFileDialog and FolderBrowserDialog components. 

C# PictureBox - Loading Image From Internet With Progress Tracking

C# PictureBox Control and Image Load Progress

In this article we will explore the PictureBox Control and ProgressBar Control with an example walk through. PictureBox control is mainly used for an image. Using this control, one can show standard images files in a C# windows form. The image type can be BMP, JPG, JIF, PNG, etc. A ProgressBar control shows the progress of long-running process.

NumericUpdown and LinkLabel Example

NumericUpDown and LinkLabel Control in C#

LinkLabel Control is a kind of Label Control but it serves the view of a hyper-link. With this LinkLabel Control, you can mark portion the Label text or the full Label text with an underline. NumericUpDown Control is a mix of the text box and a pair of arrows pointing in opposite directions. Clicking the arrows of the NumericUpDown or holding down the mouse pointer on the arrow will increments or decrements the linked value. Most the application settings page uses this control. In the example, we will set up a windows Form and study these controls.

Variable Number of Parameters to Constructor

Custom Foreach Example Using IEnumerator and IEnumerable

We know that C# supports foreach loop to iterate through a collection. When we use For-Each we no need to worry about bounds check. Here, we will create Books collection maintained by Book Store and provide Custom For-each support for the collection class. This will help the client code to use for-each loop on our collection class.