Skip to content
Latest
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.

ViewState is Turned OFF, 3 Post-Back And its Result

Viewstate of Server in ASP.Net PostBack

Page Level Viewstate is useful for the server to recall the data exchange between the Browser Posts. In this example, we will create a simple form to collect user data and perform multiple data posts to the server. With this Form Field Data, we will study behavior of the server by turning the ViewState ON and OFF.