我有一个标签和代码:
string User = Environment.UserName;
toolStripStatusLabel1.Text = "This Software is Licensed to:" + User;
由于某种原因,输出是:
This Software is Licensed to:UserName
答案 0 :(得分:3)
非常简单的修复:
string User = Environment.UserName;
toolStripStatusLabel1.Text = "This Software is Licensed to: " + User;
// Add a space after 'to:'
希望这有帮助!
答案 1 :(得分:1)
尝试在“:”
之后插入一个空格