473,394 Members | 1,746 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

keyboard shortcut

121 100+
i really need this

i have 10 lines of code in c#, now what i want to do is comment them all..

i know one solution go to everyline and put // in front it, fine.
but is their anyway that i can select that 10 keys press some key from keyboard and all 10 lines gets commented and vice-versa??

Thanks.
Jan 8 '09 #1
6 1454
Curtis Rutland
3,256 Expert 2GB
In Visual Studio, there is a Comment/Uncomment set of buttons.

Highlight the lines you want commented, and push the button.

Here's a pic. Notice the highlighted button.

Jan 8 '09 #2
jkmyoung
2,057 Expert 2GB
This is doable in most development environments. Which one are you using?
Jan 8 '09 #3
Curtis Rutland
3,256 Expert 2GB
I just assumed that since he mentioned C#, it's VS.
Jan 8 '09 #4
RedSon
5,000 Expert 4TB
@jay123
Why would you just not use a block comment?
Expand|Select|Wrap|Line Numbers
  1.  /*...*/ 
Jan 8 '09 #5
jay123
121 100+
thanks everyone.. as i have just started my programming career so trying to learn all the shortcuts..

Cheers
Jan 9 '09 #6
uogen
18
Hi,
to make 10 line comment make /*before first line and after the line number ten make */ after you make this ,the color for ten lines will be green
/* line1





line10 */
to cancel comment remove this sign(/* */)

i hope this help you
Jan 9 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: The Flyer | last post by:
Hi Sorry for posting this message to so many groups, but I was not sure which group the windows keyboard experts would be reading, so I ventured to post it to all of them. I want to map or...
13
by: Ole Hanson | last post by:
Hi I am in need of a way to launch my WinForms-app (app.exe) just by pressing a keyboard combination like (Ctrl-Alt-P). This functionality should be present "out of the box" after the app...
0
by: Anders S. Willumsen | last post by:
Hi I have an app in system tray (by the clock), and I need somekind of keyboard shortcut to activate it. I know I can click on then icon and get a contex menu, but I need to be able to activate...
1
by: Esemi | last post by:
Hi What is the best why to create a custom keyboard shortcut (eg alt-a) on a ..Net form using C#? Thanks
3
by: nhmark64 | last post by:
Hi, Sometimes when I am cutting and pasting it looks like the keyboard layout changes; for instance ',' and 'w' are interchanged. Is there a better way to fix this problem than exiting then...
3
by: ommail | last post by:
I have two RichTextBox controls on a form, and single ContextMenuStrip control which serves for both textboxes. I need to determine which RichTextBox control invokes an event handler in...
331
by: Xah Lee | last post by:
http://xahlee.org/emacs/modernization.html ] The Modernization of Emacs ---------------------------------------- THE PROBLEM Emacs is a great editor. It is perhaps the most powerful and...
3
by: Rotsey | last post by:
Hi, I have windows app that I have a windows keyboard shortcut for. I am finding that the shortcut is not all that responsive. ie it takes sometimes more than a 5 seconds for form to appear...
2
by: Aranis | last post by:
Would anyone know how to use a keyboard shortcut so at the end of a method syntax I can use that shortcut to create the method's pair of { } brackets ? Thank you much, Aranis
8
by: BD | last post by:
How can I duplicate the behavior of the operating system shortcut keys in my application? For example, my windows form has 5 controls (textboxes), the operating system will pickup which control...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.