wordFolderPath
is a variable public to your class (but private outside of it). This means that anything inside your class can freely read/write the value.
As for your syntax, you can just use the variable name or use this.
:
private void DoAThing()
{
wordFolderPath = "asdf";
this.wordFolderPath = "qwerty"; //these are the same
}
You can't use the current class's name when accessing an internal variable. formWords
is a type, not an instance.
The only advantage of using this
is because it is legal to have a variable of the same name defined within your method. Using this keyword makes sure you are talking about the class's member.