StringItemComparer Standard Introduction

Generated Source Code Base Class

System.Collections.Generic.IComparer<T>

Description

The StringItemComparer class provides culture aware case sensitive or case insensitive String comparison or ordinal case sensitive or ordinal case insensitive String comparison in either ascending or descending order. The generated source code provides a closed constructed implementation of the generic IComparer<T> interface. The generated comparer class can be initialized to compare in ascending or descending order and a StringComparison enumerated value can also be specified. The generated source code uses the, static, String.Compare method to compare the two specified String types using the specified StringComparison value. When used to sort a list or collection of strings the comparer can be used to sort in ascending or descending order. The StringItemComparer class can be used with the List<T> class or a custom collection class to provide ascending or descending binary search and sort functionality.

Generated Source Code .Net Framework Version Compatibility

Versions: 3.5, 3.0 and 2.0

Generation Properties

You will be required to select/specify the following values in the generation property wizard as part of the source code generation process:

Property Description
Language You can generate either CSharp or Visual Basic source code
Namespace The comparer class namespace (CSharp only)

Note

Visual Basic Only

If the collection class is not in the default (project) namespace i.e. it is in a sub-namespace, a Namespace statement will need to be added to the generated source code.

Terms and Conditions

Blayd Software retain the copyright and other intellectual rights to the source code as originally generated. However, once you have the source code, you may change it by altering members, adding new members or removing members and you may use the source code in your own personal or commercial projects, either in its original form or with your own alterations. We strongly recommend that you read the full terms and conditions for the use of the generated source code before continuing.

Hints and Tips

We have put together a page of hints and tips to help you get the most out of our .Net Framework source code generator. If you have any doubts or queries about the generation properties and their influence on the generated source code or any other queries we recommend that you read the hints and tips before continuing.

StringItemComparer Standard

The generated source code is supplied free of charge for personal use, however, if the source code is to be used in a commercial project we request that you make a donation to help us to cover the cost of developing and testing the source code and the cost of providing the online code generator service. You may also make a donation even if the source code is for personal use. Although we do not expect you to donate for personal use we would appreciate the gesture.

The option to make a donation to help cover the cost of the service is provided on the generated source code page, click the "Continue" button to specify the generation properties and generate your source code.