Hi Melissa,
The .NET Framework has provided a InputBox for VB.NET. and we can reuse it
in other .NET languages.
You need reference the "Microsoft.VisualBasic.dll" assembly and use it like
this,
string str = Interaction.InputBox("hello:","This is an
InputBox","World!",30,40);
Note, due to C# didn't support the optional value, you need to provide full
params to call the InputBox method.
However, you may define a wrapper method to do this.
Thanks, if you have any further questions , please let me know.
Best regards,
Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties and confers no rights.
You should not reply this mail directly, "Online" should be removed before
sending, Thanks!
--------------------
| Content-Class: urn:content-classes:message
| From: "Deepak" <
[email protected]>
| Sender: "Deepak" <
[email protected]>
| References: <
[email protected]>
| Subject: inputbox for C#
| Date: Wed, 24 Sep 2003 18:32:57 -0700
| Lines: 19
| Message-ID: <
[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcODBPK/ttPWxplzT5C6I48yAGlvbQ==
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:53060
| NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
|
| No, there is no Input box in C#. You will have to create
| your own.
|
| Regards
|
| Deepak
| #*#*#*#*#*#*#*#
| I Code, therefore I am
|
| >-----Original Message-----
| >Hello,
| >Just wondering if there is an equivelant available to C#
| >for quick string input. I am NOT using vb.net so i cant
| >use that version.
| >
| >TIA,
| >Mel
| >.
| >
|