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

inputbox for C# by Deepak

Deepak
Wed Sep 24 20:32:57 CDT 2003

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
>.
>

RE: inputbox for C# by v-yiy

v-yiy
Wed Sep 24 21:59:38 CDT 2003

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" <letsdotnet@hotmail.com>
| Sender: "Deepak" <letsdotnet@hotmail.com>
| References: <11fd01c382c2$d820f250$3501280a@phx.gbl>
| Subject: inputbox for C#
| Date: Wed, 24 Sep 2003 18:32:57 -0700
| Lines: 19
| Message-ID: <102001c38304$f2c217a0$a401280a@phx.gbl>
| 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
| >.
| >
|


Re: inputbox for C# by letsdotnet

letsdotnet
Thu Sep 25 00:55:10 CDT 2003

Hi Ying,
I was under the impression that Microsoft.VisualBasic.dll namespace is
there only to help VB6 programers find things that they so much loved
(such as VbCrlf, Input Box...), the idea still being to use the
framework as much as possible. I also think that this namespace
discourages one to explore many rich features provided by the
framework, thus its use should be discouraged. Personally I don't do
much VB.NET, but whenever I have to, I make sure that I do not include
this namespace.

Just a bit of opinion

Regards

Deepak
#*#*#*#*#*#*#*#*#*#*#*#
I Code, therefore I am




v-yiy@online.microsoft.com (Ying-Shen Yu[MSFT]) wrote in message news:<v62CJFxgDHA.1928@cpmsftngxa06.phx.gbl>...
> 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" <letsdotnet@hotmail.com>
> | Sender: "Deepak" <letsdotnet@hotmail.com>
> | References: <11fd01c382c2$d820f250$3501280a@phx.gbl>
> | Subject: inputbox for C#
> | Date: Wed, 24 Sep 2003 18:32:57 -0700
> | Lines: 19
> | Message-ID: <102001c38304$f2c217a0$a401280a@phx.gbl>
> | 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
> | >.
> | >
> |

Re: inputbox for C# by Herfried

Herfried
Thu Sep 25 16:09:57 CDT 2003

Hello,

"Deepak Kapoor" <letsdotnet@hotmail.com> schrieb:
> I was under the impression that Microsoft.VisualBasic.dll
> namespace is there only to help VB6 programers find things
> that they so much loved (such as VbCrlf, Input Box...),#

No, the Visual Basic .NET Runtime Libarary provides some _shortcuts_ for
classes/methods of the framework that make work easiert to the developer.
Nevertheless the 'InputBox' function is only available in this library and
not in the Framework Class Libarary.

> the idea still being to use the framework as much as possible.

Why not use language-specific "shortcuts"?

> I also think that this namespace discourages one to explore
> many rich features provided by the framework, thus its use should
> be discouraged.

I don't think so. Many things in the 'Microsoft.VisualBasic' namespace are
not directly availabe in the framework.

> Personally I don't do much VB.NET, but whenever I have to,
> I make sure that I do not include this namespace.

ROFL

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet