Total .NET Analyzer Rule Documentation  

VBMsgBoxStyle Rule

Avoid references to the legacy VBMsgBoxStyle enumeration.

Remarks

In general, you should avoid references to members of the Microsoft Visual Basic .NET Runtime library. Most of the members of this library are for backwards compatibility with older version of Visual Basic. Generally, references to legacy calls do not take full advantage of the .NET framework, and are not portable to other languages without an explicit reference to the Microsoft Visual Basic .NET Runtime library . In almost every case, you can replace calls to this library with .NET equivalents.

Resolution

When you call the MsgBox function, you can use the MsgBoxStyle enumeration in your code in place of the actual values. Note that the Visual Basic MsgBox function is not as full featured as the equivalent .NET System.Windows.Forms.MessageBox class. Consider changing the code to use the .NET class instead.

See Also

MsgBoxStyle

MessageBox Class