I know I can do this:
Dim Amount As Double = CDbl(DGVRow.Cells("Amount").Value)
Dim Amount As Double = DGVRow.Cells.OfType(Of Double)("Amount").Value
If you know that it will always contain a Double, you should use
Dim Amount As Double = DirectCast(DGVRow.Cells("Amount").Value, Double)
These all produce resulting variables of type Double
Dim value As Object value = 1.23# Dim resultDC = DirectCast(value, Double) Dim resultCT = CType(value, Double) Dim resultCDBL = CDbl(value)
But there are different things going on behind the scenes. DirectCast is the most straightforward.
Check this post Difference between DirectCast() and CType() in VB.Net which details the difference between the conversion methods in VB.net. Also this one VB CStr, CDate, CBool, etc. vs. DirectCast for casting without conversion.
Basically, DirectCast is preferred when you know your Object contains the type you expect, so no conversion is necessary. It will be faster than the other options.