Using System;
Using System. Collections. Generic;
Using System. ComponentModel;
Using System. Data;
Using System. Drawing;
Using System. Linq;
Using System. Text;
Using System. Windows. Forms;
# Region Wu xinqiang: 10:55:03, January 1, 2507
# Endregion
Namespace Compares
{
Public partial class Form1: Form
{
Public Form1 ()
{
InitializeComponent ();
}
/// <Summary>
/// The comparison string is case-insensitive.
/// </Summary>
/// <Param name = "sender"> </param>
/// <Param name = "e"> </param>
Private void button#click (object sender, EventArgs e)
{
If (string. Compare (textBox1. Text. ToLower (), textBox2.Text. ToLower () <0)
MessageBox. Show ("string 1 less than string 2", "Information", MessageBoxButtons. OK, MessageBoxIcon. Information );
If (string. Compare (textBox1.Text. ToLower (), textBox2.Text. ToLower () = 0)
MessageBox. Show ("string 1 equals string 2", "Information", MessageBoxButtons. OK, MessageBoxIcon. Information );
If (string. Compare (textBox1.Text. ToLower (), textBox2.Text. ToLower ()> 0)
MessageBox. Show ("string 1 is greater than string 2", "Information", MessageBoxButtons. OK, MessageBoxIcon. Information );
}
}
}