FindReplaceOptionsMatchCase Property |
True indicates case-sensitive comparison, false indicates case-insensitive comparison.
Syntax
public bool MatchCase { get; set; }
Public Property MatchCase As Boolean
Get
Set
public:
property bool MatchCase {
bool get ();
void set (bool value);
}
member MatchCase : bool with get, set
Property Value
Type:
Boolean
Examples
Shows how to toggle case sensitivity when performing a find-and-replace operation.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Writeln("Ruby bought a ruby necklace.");
FindReplaceOptions options = new FindReplaceOptions();
options.MatchCase = matchCase;
doc.Range.Replace("Ruby", "Jade", options);
Assert.AreEqual(matchCase ? "Jade bought a ruby necklace." : "Jade bought a Jade necklace.",
doc.GetText().Trim());
See Also