In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Today, I will talk to you about how to achieve C#space expression and answer, many people may not know much, in order to let everyone know more, Xiaobian summarized the following content for everyone, I hope you can harvest according to this article.
Implement C#space to represent the question
I want to add one or several spaces to a string. What should I do? How should I write space?
Implement C#space to indicate answer 1
Console.WriteLine( "|| "+ " "+ "space "+ " "+|| ");
Implement C#space to indicate answer 2
string str = "Hello " str.PadLeft(10, ' ');
PadRight
5 spaces are added, excluding the 5 lengths occupied by Hello.
C#is the answer.
You can add spaces directly "" or you can write your own method of adding spaces. If it is to fill spaces around, you can directly use
PadLeft PadRight
After reading the above, do you have any further understanding of how to implement C#space representation and answer? If you still want to know more knowledge or related content, please pay attention to the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.