Interface issues upgrading from 17.7 version to 20.11

Hi,
I’m working on upgrading our mechanism to work with 20.11 version of Aspose (today we are using 17.7 version)

I’ve reviewed the changes and saw that the interface has changed for several methods.
the main issue that I’m having is the Paragraph.Range.Replace method.

Old interface method i used before: “public int Replace(string oldValue, string newValue, bool isMatchCase, bool isMatchWholeWord)”

New interface method advised by you: “public int Replace(string pattern, string replacement, FindReplaceOptions options)”

In old method I used to call it with isMatchCase = “false” and isMatchWholeWord = “true”.

I’m trying to look for equivalent fields in FindReplaceOptions but I’m not sure which fields I need to use.

I tried to use this:


FindReplaceOptions replaceOptions = new FindReplaceOptions();
replaceOptions.MatchCase = false;
replaceOptions.FindWholeWordsOnly = true;

Please let me know if I was right? and if not how do i use the Replace method with same options as i used to in the old interface

@aviv.feinstein,

Yes, you need to use FindReplaceOptions.MatchCase Property, FindReplaceOptions.FindWholeWordsOnly Property and Range.Replace(String, String, FindReplaceOptions) Method when upgrading to the latest 21.1 version of Aspose.Words for .NET.