How to add reference to Microsoft.VisualBasic.dll?

后端 未结 3 1104
闹比i
闹比i 2020-12-01 12:56
using Microsoft.VisualBasic;

Microsoft.VisualBasic.Interaction.InputBox(\"Favourite RPG?\", \"Game\", \"Cool!\");

So what this does is basically a

相关标签:
3条回答
  • 2020-12-01 13:32

    You need to add a reference to the Microsoft.VisualBasic.dll

    The using statement you have is not a reference. It's merely a shortcut so you don't have to type the full namespace every time you want to access a member inside it.

    0 讨论(0)
  • 2020-12-01 13:43

    In addition to using Microsoft.VisualBasic; add the reference, too. Here's a visual answer:

    enter image description here

    Then

    enter image description here

    0 讨论(0)
  • 2020-12-01 13:46

    Right click your References in the Solution Explorer click Add Reference,then search for Microsoft.VisualBasic and add it to your references.

    For more information see this documentation: How to: Add or Remove References By Using the Add Reference Dialog Box

    0 讨论(0)
提交回复
热议问题