Assuming picCanvas is a PictureBox, which of the following four declarations and initializations is best? Which is worst?
' Version 1.
Dim bm As Bitmap = New Bitmap(picCanvas.Image)
' Version 2.
Dim bm As New Bitmap(picCanvas.Image)
' Version 3.
Dim bm = New Bitmap(picCanvas.Image)
' Version 4.
Dim bm As Bitmap
bm = New Bitmap(picCanvas.Image)
|