Legendary Lambe Legendary Lambe - 2 years ago 126
Vb.net Question

Is there a difference between MsgBox and MessageBox.Show?

Is there a difference between the two:


Some tutorials use msgbox(), and some use the other, messagebox.show()---I see that both can have an editable style, but I was wondering: Why are there two?

Is it to accommodate older programmers (who have learnt on an older version of Visual Basic)?

So in that case, which one should I use in Visual Basic 2010 (Visual Studio 2010)?

Answer Source

MsgBox() is the same as Messagebox.Show().

It exists for VB6 programmers who are used to it.

There are no rules on which one to use, but since MsgBox simply ends up delegating to MessageBox, I personally would go directly with MessageBox.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download