In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail what the application skills of VB.NET split and merge sentences are, and the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
The usage of VB.NET programming language is flexible and diversified, which greatly meets the special needs of developers in programming and greatly improves the programming efficiency. For example, the merging and splitting of statements.
When you write code, you often create long statements that make you have to scroll horizontally in the code editor. While this does not affect the way the code works, it makes it difficult for you and others to read the code displayed on the monitor. In this case, you should consider splitting a single long statement into several lines.
At other times, you may want to merge multiple statements into one line (for example, when you have several very short statements and want to save space). It is also convenient to use this feature when organizing variables or commands within a module.
Split a single statement into multiple lines in the VB.NET split merge statement method
Use the line continuation character at the point where you want to break the line, which is an underscore (_). The underscore must be immediately after the space, followed by the line Terminator (carriage return).
In the following example, the statement is split into four lines. Except for the * line, the first three lines end with a line continuation.
Visual Basic cmd.CommandText = _ "SELECT * FROM Titles JOIN Publishers" _ & "ON Publishers.PubId = Titles.PubID" _ & "WHERE Publishers.State = 'CA'"
This makes the code easier to read, whether online or after printing.
Be careful
The line continuation must be a * * character on a line. On the same line, the line continuation cannot be followed by anything else.
There are some restrictions on where the line continuation character can be used, such as not in the middle of the parameter name. You can split a list of parameters with a line continuation character, but the single parameter name must be kept intact.
Be careful
You cannot use a line continuation character to split comments. After the comment starts, the compiler does not check whether the character has a special meaning. To split a comment into multiple lines, reuse the comment symbol (') before each line.
Although the recommended approach is to have each statement on a single line, Visual Basic also allows multiple statements to be placed on the same line.
Put multiple statements on the same line in the VB.NET split and merge statement method
Separate the statements with a colon (:), as shown in the following example.
Visual Basic text1.Text = "Hello": text1.BackColor = System.Drawing.Color on the VB.NET split merge sentence application skills shared here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.