Hey :)
I'm pretty new to C#, but I decided to start a little project to understand the way of C#!
So, I want to get some data from the html file of a webpage. I'm currently doing that with the following method:
private string[] GetRessources() { string[] ressources = new string[3]; ressources[0] = browser.Document.GetElementById("res1").InnerHtml.; ressources[1] = browser.Document.GetElementById("res2").InnerHtml; ressources[2] = browser.Document.GetElementById("res3").InnerHtml; return ressources; }
|
after running the method, I'm actually getting those ressources!
But on the real webpage, the ressources are refreshing every second. In my program they aren't!
Can I somehow repeat the method every second? I've tried to put the code lines 5-7 in an endless while-loop, but that causes my program to "not response", logically ^^.
If you told me any method to check for a change and update those ressources if there were, without letting the program cash, i'd be very thankfull! I'm having this problem with some other methods, too.
thanks! Basti