I'm using Spire.PDF free version with Visual Studio 2019 (C#) and I have this code:
- Code: Select all
results = page.FindText("my text", TextFindParameter.WholeWord).Finds;
So, How can I replace "my text" in this code by a string variable? For example
- Code: Select all
string name;
name = "new text";
results = page.FindText(name, TextFindParameter.WholeWord).Finds;
When I use this code, there is a erro message: Use of unassigned local variable 'name' (Error code: CS0165)
Help me, please!
Thank you!