I have this code:
vm.Points = phrase.Points.ToString();
I would like to replace it with something that would put an X character as many times as there are phrase.Points where phrase.Points is an integer.
So if phrase.Points has a value of 5 then I would like the value of vm.Points to be "XXXXX"
您正在寻找这个:
new String('X', phrase.Points);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.