-11

I don't know about C#, but I have sample code for it. Can I post on Stack Overflow regarding what statements of the code does?

8
  • 5
    That'd be off-topic IMO.
    – CinCout
    Commented Sep 8, 2017 at 12:05
  • 5
    That's easily too broad, we don't explain whole pieces of sample code. You can probably ask about specific, individual expressions or statements, sharing your research.
    – Martijn Pieters Mod
    Commented Sep 8, 2017 at 12:10
  • If you have a question about a very specific line of code and can argue why it is strange for you, then it should be fine, but a "line-by-line" explanation of a code snippet is "too broad".
    – Tom
    Commented Sep 8, 2017 at 12:10
  • 2
    Granted, @ErikvonAsmuth, but the one I chose is from the perspective of the asker, rather than a third party, which matches a little better.
    – jscs
    Commented Sep 8, 2017 at 12:39
  • @JoshCaswell That's true, I just want to avoid users having to click 5 times before they get to the original question and can comment and post answers there (and avoid me having to repeat "of a duplicate" even more times the next time this is asked).
    – Erik A
    Commented Sep 8, 2017 at 12:42
  • Why don't you google the individual statements you don't understand? No need to dump it on SO
    – EpicKip
    Commented Sep 8, 2017 at 12:54
  • 4
    "I don't know about C#" is a fairly broad statement, and I'm not sure exactly what you mean by that, but if you mean that you aren't familiar with the language at all and have no experience with it, then it seems that any question you could ask about it at this point would show no research effort by definition. You should try to familiarize yourself with a topic as much as you can before you ask about it here, or you won't be able to ask a good question. Commented Sep 8, 2017 at 13:03
  • -11.. that was so rude... :( Commented Jul 20, 2022 at 5:32

1 Answer 1

11

If you're talking about an entire block of code that you need explained to you, that would be off-topic. That's not the sort of thing that would be very useful to other people in the future, so it wouldn't make a good question for Stack Overflow. You probably need to find a mentor or a tutor who can sit down with you and explain it.

If you're just talking about a specific line of code, though, it might be on-topic. There are tricky bits of code that we frequently encounter that would be worthwhile to share with a broader audience. For example, questions about , or i = i++ + ++i; in Why are these constructs (using ++) undefined behavior? If you have something like that, make sure you've thoroughly researched it (that particular question gets re-asked on a weekly basis), and that you show the code in-context with a Minimal, Complete, and Verifiable Example that would be helpful to future users.

Not the answer you're looking for? Browse other questions tagged .