This web site uses cookies. By using the site you accept the cookie policy.This message is for compliance with the UK ICO law.

<< Previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Next >> |
Convert a String to Title CaseConvert a String to Title Case
Text can be converted to entirely upper case or lower case using standard methods from the String class. Another common format is title case, where the first letter of each word is usually capitalised. This case can be applied using the TextInfo class.
Logging Messages in Event LogsLogging Messages in Event Logs
Microsoft Windows provides a built-in event logging system where informational messages, warnings, errors and audit details can be stored and viewed with the Event Viewer utility. This system is ideal for logging messages generated by a .NET application.
Implementing IDisposableImplementing IDisposable
Classes that use unmanaged resources, or that hold references to managed objects that themselves use unmanaged resources, should always implement the IDisposable interface. The correct use of this interface ensures the efficient release of resources.
Converting an Entire Array to a New TypeConverting an Entire Array to a New Type
Sometimes you will want to convert the contents of an entire array from one type to another. Using the .NET framework 2.0, generics and delegates, this process can be achieved without the requirement to manually create looping structures.
Numeric Types, MaxValue and MinValueNumeric Types, MaxValue and MinValue
All of the basic numeric data types include two useful fields named MaxValue and MinValue. In this short article, these two properties are used to show the full range of values that can be held in each of the numeric types.
The Object ClassThe Object Class
The Object class is a special type that is the base class for all other classes and types, including the value types. It defines a set of methods that are therefore inherited by every other type that is defined within the .NET framework class library.
Using the EventHandler DelegateUsing the EventHandler Delegate
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 Assemblies.NET Assemblies
The seventeenth part of the C# Object-Oriented Programming tutorial considers .NET assemblies. The building blocks of .NET programs, assemblies are the files that contain all of the code, versioning information and resources for an application.
.NET Namespaces.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.
TimeSpan Multiplication and DivisionTimeSpan Multiplication and Division
The TimeSpan structure is great for storing a period of time that can be expressed in small values, such as milliseconds or ticks, as well as large durations such as months and years. Unfortunately the structure does not directly support multiplication.
<< Previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Next >> |