新男孩的简单问题 [英] Simple question for new boy

查看:56
本文介绍了新男孩的简单问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我刚刚开始使用C#而且我已经遇到了问题。


i需要将此行从VB6转换为C#。


txtAnswer.text =(txtNumberOne.text - 32)* 5/6


谢谢


ian

Hi

I just started with C# and already i have a problem.

i need to transalt this line from VB6 to C#.

txtAnswer.text = (txtNumberOne.text - 32) * 5/6

Thanks

ian

推荐答案




我想txtAnswer和txtNumberOne是文本框:


txtAnswer.Text =(txtNumberOne.Text - 32)* 5/6;


-

问候,

Peter Jausovec

http://blog.jausovec .net

" Ian" < ia*@NoWhere.com> je napisalvsporoèilo

news:u6 ************** @ TK2MSFTNGP11.phx.gbl ...
Hi,

I suppose txtAnswer and txtNumberOne are textboxes:

txtAnswer.Text = (txtNumberOne.Text - 32) * 5/6;

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
"Ian" <ia*@NoWhere.com> je napisal v sporoèilo
news:u6**************@TK2MSFTNGP11.phx.gbl ...

我刚刚开始使用C#而且我已经遇到了问题。

我需要将这一行从VB6转换为C#。

txtAnswer.text =(txtNumberOne .text - 32)* 5/6

感谢

ian
Hi

I just started with C# and already i have a problem.

i need to transalt this line from VB6 to C#.

txtAnswer.text = (txtNumberOne.text - 32) * 5/6

Thanks

ian



是的,但是这条线不起作用,我已经尝试过了。


该应用程序甚至无法启动。它说你不能对

文本数据类型进行计算。


" Peter Jausovec" < PE *** @ jausovec.net>在消息中写道

新闻:uw ************** @ TK2MSFTNGP15.phx.gbl ...
Yes they are but that line does not work, I have tried it.

The application wont even start up. it says that you cant do calculations on
text data types.

"Peter Jausovec" <pe***@jausovec.net> wrote in message
news:uw**************@TK2MSFTNGP15.phx.gbl...

我想txtAnswer和txtNumberOne是文本框:

txtAnswer.Text =(txtNumberOne.Text - 32)* 5/6;

-
问候,
Peter Jausovec
http://blog.jausovec.net
Ian < ia*@NoWhere.com> je napisalvsporoèilo
新闻:u6 ************** @ TK2MSFTNGP11.phx.gbl ...
Hi,

I suppose txtAnswer and txtNumberOne are textboxes:

txtAnswer.Text = (txtNumberOne.Text - 32) * 5/6;

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
"Ian" <ia*@NoWhere.com> je napisal v sporoèilo
news:u6**************@TK2MSFTNGP11.phx.gbl ...

我刚刚开始使用C#,我已经遇到了问题。

我需要将这一行从VB6转换为C#。

txtAnswer.text =(txtNumberOne.text - 32 )* 5/6

ian
Hi

I just started with C# and already i have a problem.

i need to transalt this line from VB6 to C#.

txtAnswer.text = (txtNumberOne.text - 32) * 5/6

Thanks

ian



txtAnswer.text =((int.Parse(txtNumberOne.text) - 32)* 5 / 6.0).ToString();


不是我推荐的在一条线上完成所有这些;-)


问候


Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk


你好


我刚从C#开始,我已经遇到了问题。


i需要转换t从VB6到C#的行。


txtAnswer.text =(txtNumberOne.text - 32)* 5/6


谢谢


ian
txtAnswer.text = ((int.Parse(txtNumberOne.text) - 32) * 5/6.0).ToString();

Not that I''d recommend doing it all on one line ;-)

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Hi

I just started with C# and already i have a problem.

i need to transalt this line from VB6 to C#.

txtAnswer.text = (txtNumberOne.text - 32) * 5/6

Thanks

ian


这篇关于新男孩的简单问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆