Cannot get InputBox after adding reference to Microsoft.VisualBasic
I did what is said here http://www.pcreview.co.uk/forums/thread-1899493.php but in intellisense I only get Microsoft.VisualBasic.VBCodeProvider ???
step 1: Add refernce Microsoft.VisualBasic
开发者_如何学运维step 2:
private void button1_Click(object sender, EventArgs e)
{
string result = Microsoft.VisualBasic.Interaction.InputBox("kkk","text", "", 10, 20);
MessageBox.Show(result);
}
Step 1: Check if you really added the reference ;-)
Microsoft.VisualBasic.VBCodeProvider
is located in System.dll
, which is referenced for every new project. It seems to me as if you're not referencing Microsoft.VisualBasic.dll
at all.
You need to add a reference to Microsoft.VisualBasic
, not to the Microsoft.VisualBasic.Compatability
library.
精彩评论