Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleQuick Question: .NET Declarations
Keywordsquick question, quiz
CategoriesTips and Tricks
 
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)

Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated