I created a class that generates a random number:
public class DataGenerator
{
public void RandomHRValue()
{
Random random = new Random();
int RandomNumber = random.Next(0, 100);
}
}
Then I created a XAML file and placed the following in Grid:
<TextBlock Name="a" Text="" Width="196" HorizontalAlignment="Center" Margin="183,158,138,56"/>
I did nothing with the file xaml.cs. How can I put a random number in this TextBlockevery 20 seconds?
source
share