Display message box

  • Thread starter Thread starter A.A. Fussy
  • Start date Start date
There has been much already said about whether to use old VB 6.0 functions
like MsgBox() or the new .NET classes like MessageBox.Show.

My opinion is to stay away from the older VB 6.0 ways and adopt the newer
(OO) .NET ways. Yes, either will work, but MsgBox() is just going to put in
a call to the shared show method of the MessageBox class, so why not skip an
extra step and go straight into the MessageBox class. There are several
other situations like this in VB.NET.

For example, many of the "old" string functions are now methods of the
string class and many "old" numeric functions are now methods of the number
type classes. The same is also true for "old" date/time functions now being
methods of the date/time classes.
 
* "Armin Zingler said:
They appear automatically. :)

Somebody told me that some people are out there who don't use an IDE to
develop their applications.

;-)
 
Scott M. said:
There has been much already said about whether to use old VB 6.0
functions like MsgBox() or the new .NET classes like
MessageBox.Show.

My opinion is to stay away from the older VB 6.0 ways and adopt the
newer (OO) .NET ways. Yes, either will work, but MsgBox() is just
going to put in a call to the shared show method of the MessageBox
class, so why not skip an extra step and go straight into the
MessageBox class. There are several other situations like this in
VB.NET.

For example, many of the "old" string functions are now methods of
the string class and many "old" numeric functions are now methods of
the number type classes. The same is also true for "old" date/time
functions now being methods of the date/time classes.

I know. But Msgbox is shorter.
 
Back
Top