Question: I was working on a webview which was not working. I then noticed that I cannot even view google or any other webpage using the emulators browser. 

What could be the reason for this? Also do I need to setup the emulator to connect to the internet some how?

Please let me know. 

Thanks

Answer: 
It will be pretty straight. See below:

```
DateTime validFrom =  (DateTime)dtValidFrom.Value;

DateTime validTo =  (DateTime)dtValidTo.Value;

for (DateTime dt = validFrom; dt <= validTo; dt = dt.AddDays(1))
{

}

```
An other way:

```
DateTime start = new DateTime();
DateTime endval = new DateTime();
//It means it is 1 hour interval:
TimeSpan inctrementval = new TimeSpan(1, 0, 0);

for (DateTime t = start; t < endval; t += incrementval)
{
    //Your code will not reach endval
}

```

Or:

```
for (DateTime t = start; t <= endval; t += incrementval)
{
    //Your code will reach endval
}

```