string.Format

string output;
int selection = 5;

// Generate the output string
output = string.Format("You selected item {0} from the list.", selection);

Console.WriteLine(output);     // Outputs "You selected item 5 from the list."

posted @ 2010-04-06 00:09  greencolor  阅读(189)  评论(0)    收藏  举报