Table of Contents

Class StdLibOptionCompareAttribute

Namespace
RDCore.SDK.Runtime.Abstract.StdLib
Assembly
RDCore.SDK.dll

Marks a standard-library Compare parameter that a call omits as taking the Option Compare of the calling module.

[AttributeUsage(AttributeTargets.Parameter)]
public sealed class StdLibOptionCompareAttribute : Attribute
Inheritance
StdLibOptionCompareAttribute
Inherited Members

Remarks

MS-VBAL §6.1.2.11 declares each comparing member's Compare as Optional Compare As VbCompareMethod = vbBinaryCompare, and its runtime semantics say "if omitted, it uses the <option-compare-directive> of the calling module". The declaration keeps its C# default of VBBinaryCompare, which is what a caller with no calling module - a direct call to the dispatcher - gets. A call from source fills an omitted one at the call site, where the caller's frame is still the current one, with VBTextCompare when the caller compares in text mode and VBBinaryCompare otherwise, Option Compare Database standing for whatever the environment says it does. The member then never needs to know whether its argument was written.