1

VB programmers know that there was an inputbox dialoge box for asking user to simply input an string.
I'm just curious that if there is any similar in C# or I have to use a designed form?

tnx.

2 Answers 2

1

You can just use the visual basic function:

string returnVal = Microsoft.VisualBasic.Interaction.InputBox("Enter a string", "Title", "", -1, -1);
Sign up to request clarification or add additional context in comments.

2 Comments

This is not working for me. It says Interaction does not exist in the Microsoft.VisualBasic namespace for VS 2010.
You have to import Microsoft.Visualbasic into your references, then it will work as explained.
1

The same method still exists in VB.NET!

http://msdn.microsoft.com/en-us/library/6z0ak68w%28v=VS.90%29.aspx

3 Comments

I know, I didn't ask for VB. I asked for its existence in .Net! C# maybe!
@MBZ C# is to .NET as Square is to Rectangle.
I become too crappy, Updated Q.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.