Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All


Visual Studio .NET 2003

Causes strings to be compared based on their binary representations.



In Microsoft Windows, the code page being used determines the binary sort order. A typical binary sort order is shown in the following example:

A < B < E < Z < a < b < e < z < À < Ê < Ø < à < ê < ø

To set /optioncompare:binary 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:binary programmatically


The following code compiles myfile.vb and uses binary string comparisons:

vbc /optioncompare:binary myfile.vb

See Also

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

© 2015 Microsoft