Friday, January 7, 2011

How to use InputBox in c#

Here i will show how you can make use of InputBox in c#. There is no control for InputBox in c# but you can get that from VisualBasic.

 

First you have to add one .dll file from the

Project
Menu -> Add refercenc - > Micorsoft.VisualBasic

and then you can make use of InputBox.

            String yourname = Microsoft.VisualBasic.Interaction.InputBox("Enter Your Name");
             MessageBox.Show("Your name is :" + yourname);

 

 

No comments:

Post a Comment