Struct StringComparisonRules
How the relational operators compare String values where an operation is evaluated or analyzed (MS-VBAL §5.6.9.5):
the comparison mode of the module, and the regional settings of the environment.
public readonly record struct StringComparisonRules : IEquatable<StringComparisonRules>
- Implements
- Inherited Members
Constructors
StringComparisonRules(OptionCompare, CultureInfo?)
How the relational operators compare String values where an operation is evaluated or analyzed (MS-VBAL §5.6.9.5):
the comparison mode of the module, and the regional settings of the environment.
public StringComparisonRules(OptionCompare Mode = OptionCompare.Binary, CultureInfo? Culture = null)
Parameters
ModeOptionCompareThe comparison mode of the module (MS-VBAL §5.2.1.1): Text compares regardless of case, anything else compares by character code. Never Database: that is resolved to one of the two by the platform.
CultureCultureInfoThe regional settings of the environment, that text is collated by. The invariant culture when none is given.
Properties
Comparer
Compares strings the way the relational operators do: by the code of each character in binary mode (MS-VBAL §5.6.9.5), and regardless of case according to the environment's collation in text mode.
public StringComparer Comparer { get; }
Property Value
Culture
The regional settings of the environment, that text is collated by. The invariant culture when none is given.
public CultureInfo? Culture { get; init; }
Property Value
EffectiveCulture
The culture text comparisons are collated by.
public CultureInfo EffectiveCulture { get; }
Property Value
IgnoresCase
Whether strings that differ in case only are equal.
public bool IgnoresCase { get; }
Property Value
Mode
The comparison mode of the module (MS-VBAL §5.2.1.1): Text compares regardless of case, anything else compares by character code. Never Database: that is resolved to one of the two by the platform.
public OptionCompare Mode { get; init; }