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
Remarks
This value says which comparison an operation makes. The runtime implements the comparison itself.
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 the data of the strings. 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.
Remarks
This value says which comparison an operation makes. The runtime implements the comparison itself.
Properties
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
IsLocaleComparison
Whether this is the text comparison of a locale that a Compare argument names by its identifier, rather than the text mode of the
environment: a search then folds case the same way in every locale, and keeps the letters the locale's alphabet has.
public bool IsLocaleComparison { get; init; }
Property Value
Mode
The comparison mode of the module (MS-VBAL §5.2.1.1): Text compares regardless of case, anything else compares the data of the strings. Never Database: that is resolved to one of the two by the platform.
public OptionCompare Mode { get; init; }