Question: I want to get all sunday date between two dates and get last day between two date, how can i do that in mysql?
Example : 

```
start date | end date
2017-03-01 | 2017-03-31

```

then the results are : 

```
2017-03-05
2017-03-12
2017-03-19
2017-03-26
2017-03-31

```

Start date and end date possible to change, please advise me. 
Thank you

Answer: 
The difference is that `VB.Net` allow string to be implicitly converted into byte, and throw an exception if the value cannot be converted, but c# doesn't allow string to be implicitly converted.

`SelectedIndex` is of type integer, try casting it to `byte` instead of using `ToString()` method,use the following code:

```
Properties.Settings.Default.startUp = (byte)cmbStart.SelectedIndex;

```

**Useful Links**

* [Option Explicit and Option Strict in Visual Basic .NET and in Visual Basic](https://support.microsoft.com/en-us/help/311329/option-explicit-and-option-strict-in-visual-basic-.net-and-in-visual-basic)
* [Option Strict Statement](https://msdn.microsoft.com/en-us/library/zcd4xwzs.aspx)
* [Implicit and Explicit Conversions (Visual Basic)](https://msdn.microsoft.com/en-us/library/kca3w8x6.aspx)
* [Conversions Between Strings and Other Types (Visual Basic)](https://msdn.microsoft.com/en-us/library/t6hxk86b.aspx)
* [Cannot implicitly convert type 'string' to 'int'](https://stackoverflow.com/questions/11274555/cannot-implicitly-convert-type-string-to-int)
* [Casting and Type Conversions (C# Programming Guide)](https://msdn.microsoft.com/en-us/library/ms173105.aspx)
* [How to: Convert a String to a Number (C# Programming Guide)](https://msdn.microsoft.com/en-us/library/bb397679.aspx)
You cann't. String type contain multiple byte 
you can choose maybe one of it's character 

```
cmbStart.SelectedIndex.ToString()[0]

```

this will return first character of the converted index to string (probably not what you want).
but if you combo box doesn't has more than 256 item to select from,
you can convert the returned value for selected item to byte and store it in startup.

```
(byte)cmbStart.SelectedIndex

```