I have created a class library in my project which scans a series of files. In my main project which uses this DLL as a reference, I'd like to create a progress bar which shows how many file have been scanned so far.
The dll class makes use of a foreach loop since it's purpose is to turn each file into a hash code. The foreach loop has been used to join each converted segment of a file together so that I can have a 512 bit long code, and then it proceeds to the next file.
I have defined a variable in the dll class which is -->
public static int value_ = 0;
This variable is updated at the the end of the foreach loop.
Now in my main project, I'd like to use this variable to update my progress bar at the same time the function in my class library project is running.
For example :
pb.value = value_;
I'd appreciate any hint on how I can implement this.