Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

An example Analysis of Block selection using Tips in Visual Studio

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the example analysis of block selection of Visual Studio using tips, which is very detailed and has a certain reference value. Friends who are interested must read it!

Block selection (box selection) should be familiar to all of you, that is, hold down the alt key, then drag the mouse across multiple lines, and after releasing the mouse, all the contents in the block will be selected.

Some techniques related to box selection are listed below, but most of them are only supported in Visual Studio 2010.

1. Copy content from one block to another

Versions: 2008,2010

Suppose you have the following code:

You realize that you want to declare the variables in the * section to the same type as the variables in the second part.

First select (ALT+ the left mouse button) the type of the second part of the variable, and copy.

Then select the variable type in the * * section (ALT+ left mouse button)

* paste (paste)

two。 Replace the contents of the block

Versions: 2010

The 2010 feature allows you to replace the contents of all lines in the block at once.

First select the block

Then type in the content to be replaced

3. Copy a single line of content into a block

Versions: 2010

Similar to the second item "replace the contents of the block", except that paste is used instead of input.

Suppose you have the following code

You realize you want to change int to double, no problem! Select double and assign a value (Ctrl + C)

Block check int (ALT+ left mouse button)

*, paste (Ctrl + V)

4. Zero-length block selection

Versions: 2010

I tried it in Visual Studio 2008, and I really don't support zero-length chunk selection.

Suppose you have the following code, and you want to declare it as public.

First, make a zero-length block selection, hold down the Alt key and the left mouse button, and drag down. Like this

Then release the Alt button and the left mouse button, and you can start pasting or typing public.

The above is all the content of the article "sample Analysis of Block selection in Visual Studio using Tips". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report