473,471 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how do I copy the code with line numbers

1 New Member
I am trying to copy my code with line numbers, but when I select all and right click the code there is no option copy in html. can you help, thank you?
Dec 15 '10 #1
2 3724
weaknessforcats
9,208 Recognized Expert Moderator Expert
Line numbers are not part of the code so there's nothing to copy. Just copy your selection and add the line numbers to the copy but realize that it won't compile any longer.
Dec 15 '10 #2
donbock
2,426 Recognized Expert Top Contributor
I assume you are asking how to post source code in this forum.

Look here. A short-cut technique is to paste the lines of code (with no line numbers), select the lines of code, and then press the # button at the top of the post-entry window.

Notice that line numbering in your post always starts from 1, so line numbers in your post are typically different than line numbers in your actual source code. Compiler messages typically indicate the relevant line number. It is very helpful if you somehow indicate which line in your post corresponds to the line indicated in the message. You can use the Preview button to see what line numbers will be seen by people reading your post.
Dec 15 '10 #3

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

Similar topics

5
by: drew | last post by:
I am reading my textbook and doing the code examples in MS Visual C++ 6.0 for my next class beginning Jan 05. The textbook examples show line numbers. How do I get line numbers to show as I type in...
3
by: jbeck | last post by:
Hello everyone, This is my first post to this newsgroup. I came across it by accident searching Google for information on how to make line numbers appear in the editor window of Microsoft...
14
by: Vlad | last post by:
Please consider this code public class MyClass{ public bool MyMethod1(){ return false; } public bool MyMethod2(){ int x=0,y=1/x; return false; }
8
by: Arun Bhalla | last post by:
Hi, I'm developing an Explorer bar using VS.NET 2003 (C#) on Windows XP. For some time, I've noticed that I don't have filenames and line numbers appearing in my exceptions' stack traces. On...
0
by: Navin | last post by:
Hi, I am making a code editor in C# and want to display line numbers to the left. I have a UserControl with a ListView docked to the left edge and a TextBox that makes up the rest. I am able to...
3
by: Adam Eavy via DotNetMonster.com | last post by:
Hi, could any1 kindly tell me how to implement line numbers with a rich text box (im making my own scripting language and really need line numbers!) Ive looked all over the net for over 4 days...
0
by: Kieran Toon | last post by:
I'm using Visual Studio 2005 and have an ASP.NET web application written in Visual Basic. When the application runs on my local webserver and hits an error, my errorhandler writes out debug...
3
by: Mark | last post by:
Hi All, I have wrote a sub to record events from within the database. A lot of these events are errors. The sub has the module name and function/sub name passed to it to record to the table. My...
5
by: Ramdas | last post by:
I am doing some HTML scrapping for a side project. I need a method using sgmllib or HTMLParser to parse an HTML file and get line nos of all the tags I tried a few things, but I am just not...
18
by: W. Watson | last post by:
See Subject. It's a simple txt file, each line is a Python stmt, but I need up to four digits added to each line with a space between the number field and the text. Perhaps someone has already done...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
1
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.