searchtext_pass
is a property of the
BackgroundWorkState
class - so you need an instance of the class in order to access it - just as you need an instance of a car in order to look in the glove box!
So you need something like:
str=ReadMsWord(myInstanceOfABackgroundWorkState.searchtext_pass);
But you can't easily access it because it's a property of the class instance you are trying to construct so it doesn't really exist yet!
Try this:
BackgroundWorkState workerState = new BackgroundWorkState();
workerState.searchtext_pass = ReadMSXls();
workerState.str = ReadMsWord(workerState.searchtext_pass);