How to add a link to Microsoft.VisualBasic.dll?

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

So what is it, basically ask the user your favorite RPG. Then the default value is displayed. I know this is a small example, but my program will not start because I get this error:

 The type or namespace name 'Interaction' does not exist in the namespace 'Microsoft.VisualBasic' (are you missing an assembly reference?) 

I originally found here here

+5
c # inputbox
Jan 19 '14 at 1:36 on
source share
3 answers

You need to add a link to Microsoft.VisualBasic.dll

The using statement used is not a reference. This is just a shortcut, so you don’t need to enter the full namespace every time you want to access a member inside it.

+12
Jan 19 '14 at 1:41
source share

In addition to using Microsoft.VisualBasic; add a link. Here is a visual answer:

enter image description here

Then

enter image description here

+17
Jan 19 '14 at 1:46
source share

Right-click your References in Solution Explorer click Add Reference , then find Microsoft.VisualBasic and add it to your links.

See this documentation for more information: How to add or remove links using the Add Link dialog box

+6
Jan 19 '14 at 1:43
source share



All Articles