Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

This question already has an answer here:

I want to attach a code file to my question, but I am not able to find a link to do it. Is attaching files possible at all?

share|improve this question

migrated from Jul 27 '11 at 12:17

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Shadow Wizard discussion Sep 29 '14 at 23:12

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

And yes, I'm aware that he's asking about attaching a file, but I still think the FAQ makes it clear that it should be inlined. – Time Traveling Bobby Jul 27 '11 at 13:17
People won't bother to sip through big files anyway, and those who are willing will ask you to send it to them personally via email. – Shadow Wizard Jul 27 '11 at 13:57
@Shadow Wizard: Don't give him the wrong ideas. Nobody on SE will do that. – Time Traveling Bobby Jul 27 '11 at 14:50
Not sure this is a duplicate of that question. Related and informative, yes, but not a dupe, IMO. – Jon Seigel Jul 28 '11 at 4:14

You can't attach a file here, but you can post your code in the question itself. Post the code in the body of your question, select it with your mouse, then click the { } button above the edit window to format it as a code block.

share|improve this answer

If you've got a large amount of code you should consider trying to reduce it to the barest minimum that repeats the problem.

You are more likely to find people will be prepared to read a short 20 line snippet of code and help you than some class file that 500+ lines long.

share|improve this answer
But it would be great to post an answer in working code, unzip and go – k.c. Sep 30 '12 at 13:51