开发者

Visual C# .NET Messagebox

开发者 https://www.devze.com 2023-01-16 11:07 出处:网络
开发者_开发百科My question is can we write: String s=\"Sarath\"; MessageBox.Show(\"My Name is Sarath {0}\",s);

开发者_开发百科My question is can we write:

String s="Sarath";
MessageBox.Show("My Name is Sarath {0}",s);

I want to get the name at the {0}..... Is there any way...

Thanks in advance.


use String.Format for that ;)


string myName = "Sarath";
MessageBox.Show(String.Format("My name is {0}.", myName));
0

精彩评论

暂无评论...
验证码 换一张
取 消