Visual Basic Compiler Options  

/optioncompare:text

Causes strings to be compared based on their text representations.

/optioncompare:text

Remarks

Text-based string comparisons are based on a case-insensitive text sort order determined by your system's locale. A typical text sort order is shown in the following example:

(A=a) < ( ?=?) < (B=b) < (E=e) < (?=?) < (Z=z) < (?=?) 

To set /optioncompare:text in the Visual Studio integrated development environment

  1. Open the project's Property Pages dialog box. For details, see <Projectname> Property Pages Dialog Box.
  2. Click the Common Properties folder.
  3. Click the Build property page.
  4. Modify the Option Compare property.

To set /optioncompare:text programmatically

Example

The following code compiles myfile.vb and uses text-based string comparisons:

vbc /optioncompare:text myfile.vb

See Also

Visual Basic Compiler Options | /optioncompare:binary | /optionstrict | /optionexplicit | Sample Compilation Command Lines