0
我有一個標籤和驗證碼:以編程方式爲標籤添加空格?
string User = Environment.UserName;
toolStripStatusLabel1.Text = "This Software is Licensed to:" + User;
出於某種原因,輸出爲:
This Software is Licensed to:UserName
我有一個標籤和驗證碼:以編程方式爲標籤添加空格?
string User = Environment.UserName;
toolStripStatusLabel1.Text = "This Software is Licensed to:" + User;
出於某種原因,輸出爲:
This Software is Licensed to:UserName
很簡單的解決辦法:
string User = Environment.UserName;
toolStripStatusLabel1.Text = "This Software is Licensed to: " + User;
// Add a space after 'to:'
希望這有助於!
嘗試在「:」後插入空格
面掌!哇,我感覺不好...謝謝,我會接受你的回答時,它會讓我 –
這不是一個笑話的問題,大聲笑 –