how could I refer VB constant (enum) in C#
Posted on 2011-03-08
I have a VB function Public Sub ShowMessage(ByVal message As String, Optional ByVal messageStyle As MsgBoxStyle = MsgBoxStyle.DefaultButton1) and I need to call it from C#. How could I submit the second parameter. In VB, I can use MsgBoxStyle.Critical, but in C#, it would give me the error "the name MsgBoxStyle doesn't exist in context". Should I import a library? thanks.