How to add reference to Microsoft.VisualBasic.dll?

puretppc picture puretppc · Jan 19, 2014 · Viewed 30.4k times · Source
using Microsoft.VisualBasic;

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

So what this does is basically ask the user their favourite RPG. Then it displays the default value. I know this is a small example but my program will not run because I'm getting this error:

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

Originally I found this here

Answer

pcnThird picture pcnThird · Jan 19, 2014

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

enter image description here

Then

enter image description here