In addition to Garth's suggestion, don't just use
and hope the system will sort it out - it can't infer from the
property what type
should be. Specify exactly what type you are expecting, and it'll start to work.
Dim deg1 = gridSelectMusician.Rows(0).Cells(0).Value
Will give you this:
so it uses
Dim deg2 As Double = gridSelectMusician.Rows(0).Cells(0).Value
Will give you a better result:
Because it can use the
override that accepts a format parameter.
It's generally a damn good idea to always specify your types - letting the system sort it out can cause all sorts of problems! (And is just one of the reasons VB is often seen as a childish language)