Reputation: 31
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.
Upvotes: 3
Views: 231
Reputation: 3430
string myName = "Sarath";
MessageBox.Show(String.Format("My name is {0}.", myName));
Upvotes: 2