I am currently stuck right now. I have moved to C# but one of the scripts in my PHP won't work when i convert it to C#. I have some problems with the array of minutes. Here is my PHP Script:
<?php
$start_hour = 10;
$end_hour = 22;
$minutes_array = array("15", "30", "45");
for($i=$start_hour; $i<($end_hour + 1); $i++){
$string = $i . ':00';
echo '<option value="' . $string . '">' . $string . '</option>';
if($i != $end_hour){
for($j=0; $j<sizeof($minutes_array); $j++){
$string = $i . ':' . $minutes_array[$j];
echo '<option value="' . $string . '">' . $string . '</option>';
}
}
}
?>
What it does is it outputs list items from 10 to 22 with 15, 30 and 45 between every count. So it looks like this
DropdownList
10:00
10:15
10:30
10:45
11:00
11:15
etc..
And here is my C# code so far:
int Opened = 8;
int Closed = 22;
for (int i = Opened; i < (Closed); i++)
{
string String = i + ":00";
Response.Write(String);
if (i != Closed)
{
for(int j = 0; j<sizeof(); j++)
{
String = i + ":" +
}
}
}
Can anyone help me converting this to C#? It would really make my day!
Thanks in advance, Jens