On 2004-12-12, Richard <kg@nospam.com> wrote:
Hi,
Both does the same thing(atleast for me).
Which is preffered to use in vb.net and why.
I wouldn't say either is globally preferred, it's more personal
preference and style. You'll find that this is true of most of the
functionality that's duplicated in both the System.* and
Microsoft.VisualBasic.* namespaces. Over time, most vb programmers fall
into a mix of the two that is comfortable for them, depending on
personal style and professional situation.
Personally, I prefer MessageBox.Show for a number of reasons:
It allows you to specify owner window, rather than have vb guess at it.
It's standard framework rather than VB-specific, so users of other
languages recognize it.
It's type-safe.
It's not always there by default. This gives you just a little bit added
protection against doing UI things in non-UI classes.