如何通过Console.Writeline回显先前的值 [英] How to echo previous values through Console.Writeline

查看:80
本文介绍了如何通过Console.Writeline回显先前的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我有以下代码,



Hello I have the following piece of code,

Console.WriteLine("YES Found SyncMode5");
int myValue = (int) subkey1.GetValue("SyncMode5");
Console.WriteLine("miValor: ", myValue);
Console.WriteLine(myValue);



以下是输出



Windows 7专业

是找到SyncMode5

miValor:

2



问题

1.为什么miValor:不输出数字2?

2.为什么Console.WriteLine(myValue)输出数字2?



我想在miValor旁边显示2号。

感谢4位帮助,

G


And the following is the output

Windows 7 Professional
YES Found SyncMode5
miValor:
2

Questions
1. Why miValor: does not output the number 2 ?
2. Why Console.WriteLine(myValue) it does output the number 2?

I would like to show the number 2 next to miValor.
Thanks 4 ur help,
G

推荐答案

Console.WriteLine("YES Found SyncMode5");
int myValue = (int) subkey1.GetValue("SyncMode5");
Console.WriteLine("miValor: {0}", myValue);





你看到了区别吗?



问候,



Manfred



Do you see the difference?

Regards,

Manfred


这篇关于如何通过Console.Writeline回显先前的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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