|
-
Jul 16th, 2004, 01:31 PM
#1
Hyperactive Member
Originally posted by TLord
Why all of this ?
VB.Net offers a compilation option: Option Compare, this option controls the behavior of the program when comparing string values, there are 2 options: Option Compare Binary which forces the strings to be in the same case for true equationing, Option Compare Text which compares the text by their characters ignorign the case - and that is the optino you want.
To use option include the statement in the top of the file preceeding any declaration (before the "Imports" statement also).
Examples:
VB Code:
Option Compare Binary
...
Dim Rs As Boolean
If "AaBbCc" = "aabbcc" Then
Rs = True 'Rs is still False
End If
VB Code:
Option Compare Text
...
Dim Rs As Boolean
If "AaBbCc" = "aabbcc" Then
Rs = True 'Rs is True now
End If
Option Compare has to do with how your source code compatibility is maintained, not how strings are compared.
If what you are saying were true, then why would Microsoft invest the effort they have into REGEX.
This kind of advice should be thoroughly researched before being offered.
Whadayamean it doesn't work....
It works fine on my machine!

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|