Question Is this bad form?

amc546

New member
Joined
Feb 21, 2009
Messages
1
Programming Experience
5-10
Is there anything terribly wrong with this?

VB.NET:
(New UTF8Encoding).GetString(Input)

or

VB.NET:
(New MD5CryptoServiceProvider).ComputeHash(InputBA)

(i.e., creating a new class instance in the same expression where you intend to use its methods)
 
Nothing wrong with those, I do this one whenever I need to display a form from Sub Main:
VB.NET:
Public Sub Main
    Application.Run(New MainForm)
End Sub
 
Back
Top