|
|
C# Structures
The twenty-second, and final, part of the C# Object-Oriented Programming tutorial reviews the use of structures. Structures provide similar functionality to classes, but when instantiated resultant variables are value types, rather than reference types.
 |
|
 |
|
Creating a Battery Power Status Monitor in C#
Sometimes programs need to know the power status of a computer. An example is Windows Update, which often requires a computer to be running on mains power before updates are installed. This article explains how to read the power status and battery life.
 |
|
 |
|
C# Interfaces
The twenty-first part of the C# Object-Oriented Programming tutorial completes the investigation of polymorphism in the C# programming language. This instalment describes the use of interfaces to determine required members in classes that implement them.
 |
|
 |
|
|
|
C# Data Structures
C# Net has a lot of different data structures, for example, one of the most common ones is an Array. However C# comes with many more basic data structures. Choosing the correct data structure to use is part of writing a well structured and efficient program.
 |
|
 |
|
3D Drawing with GDI+
Using GDI+, it is possible to create simple 3D shapes without the need for DirectX. Rotate and manipulate the shapes and display them on a 2D surface.
 |
|
 |
|
C# Abstract Classes
The twentieth part of the C# Object-Oriented Programming tutorial investigates the use of abstract classes. These are special classes that are designed to be used only as base classes for inheritance. They do not permit the instantiation of objects.
 |
|
 |
|
C# Inheritance and Constructors
The nineteenth part of the C# Object-Oriented Programming tutorial continues the discussion of inheritance. Constructor and destructor functionality is not inherited by subclasses but these can still use the constructors defined in their base class.
 |
|
 |
|
Bit Field Enumerations (.NET)
When you need to store multiple Boolean statuses for a single item, you may elect to place each on/off attribute into a bit field. If you use an enumeration marked with the FlagsAttribute class, the .NET framework will assist with some of the operations.
 |
|
 |
|
C# Inheritance
The eighteenth part of the C# Object-Oriented Programming tutorial begins the discussion of the use of inheritance. This is a powerful object-oriented concept that permits the creation of hierarchical groups of classes that share common functionality.
 |
|
 |
|
|
|
Pinging a Remote Computer (.NET)
When developing networked applications that rely on a remote computer being available, it is important to be able to check that the other system is operable. Using the .NET framework's Ping class, an ICMP echo request can be sent for this purpose.
 |
|
 |
|
A Generic Searchable Range Collection (.NET)
A common programming task is to match a value to a group of ranges in order to find a value associated with that range. The .NET framework does not provide a collection class to support this functionality so a new generic collection must be created.
 |
|
 |
|
Using the EventHandler Delegate (.NET)
When creating custom events, a delegate is declared to control the parameters that the event passes to the subscriber when the event is raised. For simplistic events with no requirement to pass information, the built-in EventHandler delegate can be used.
 |
|
 |
|
|
|
|
|
.NET Namespaces
The sixteenth part of the C# Object-Oriented Programming tutorial describes the use of namespaces. Namespaces allow classes, structures and other items to be grouped and organised and remove the possibility of class-naming conflicts.
 |
|
 |
|
Capturing the Screen Contents in .NET 2.0
When supporting installed software, descriptions of problems can be enhanced greatly by viewing the contents of the user's screen. In this article we will explore how to perform a screen grab and display the captured image in a Windows Forms application.
 |
|
 |
|
C# Events
Numeric codes held in a database as integer values or other numeric types will sometimes need to be represented visually in different formats. A common request is to pad a short number with leading zeroes to achieve a specific string length.
 |
|
 |
|
C# Delegates
The fourteenth part of the C# Object-Oriented Programming tutorial explains how to add delegates to classes and programs. Delegates are used to provide references to methods that may be altered at run-time. They are also essential when creating events.
 |
|
 |
|
Detecting the Tab Key in Windows Forms
Most keypresses in Windows Forms applications can be detected using a mixture of the KeyDown, KeyUp and KeyPress events. However, as the tab key is used to move between controls, it is not captured by these events and must be handled differently.
 |
|
 |
|
Convert Roman Numerals into Numbers (C#)
In an earlier article we converted integer values into Roman numerals, an ancient numbering system that uses letters to represent values. In this article we will reverse the process, allowing Roman numerals to be evaluated as an integer.
 |
|
 |
|
C# Indexers
The thirteenth part of the C# Object-Oriented Programming tutorial describes the use of indexers. A class that has an indexer can be used in a similar manner to an array. Objects of the class can use array-style notation to present multiple values.
 |
|
 |
|
Getting and Setting a Program's Working Folder (.NET)
When a program is executed a working folder is assigned. This may be the same folder as the program's executable or can be set to a different folder using the properties of a shortcut. The correct working folder can be found using the Environment class.
 |
|
 |
|