-6

I've read about a half dozen to a dozen "Object to the rejection of an edit" -style post to Meta. But, I really don't feel like any of them cover my case.

The post in question is this: How do I remove a compiler warning when I add a custom attribute?

The OP starts off with:

Goal: To remove the compiler warning 'CS0649' when I use my custom attribute

and never describes what the 'CS0649' warning is. I went out, googled the warning and found out that the text associated with that warning is:

Field 'field' is never assigned to, and will always have its default value 'value'

So I copied that text and added it to the body of the post up near the top. That way, no other reader would need to spend the 60 seconds and two curse words needed to look up what the OP should have copy/pasted.

The edit didn't change any code, it didn't change the OP's intention and it certainly wasn't:

...intended to address the author of the post and makes no sense as an edit. It should have been written as a comment or an answer.

Which was the rationale for the rejection.

Yes, I regularly comment that posters should include the text of error codes. For example: https://stackoverflow.com/questions/53732979/jagged-array-declared-but-cant-add-elements#comment94320967_53732979

But, in this case, I took the extra steps to copy the warning code and google it. I figured adding the warning text to the OP's text would make understanding the original post easier.

As an aside, I'm new here; my first useful post was only a few months ago (and this is my very first question to any SO site) - can I edit a question without getting mis-interpreted at 2k rep?

1
  • 4
    I'm not well-versed in C#, so I wouldn't know what error they're talking about. In spite of that, I feel like I managed to look it up in < 5 seconds and two fewer curse words. Not sure if it was necessary to add it in since...well...to those who aren't versed in C#, it would read like you're putting words in the OP's mouth.
    – Makoto
    Dec 12, 2018 at 0:49

1 Answer 1

5

The warning is already defined later on in the question:

I will still get a squiggly line in Visual Studio under someType and the warning message "Field "someType" is never assigned to, and will always have it's default value null."

If you want to save some confusion, defining it on first use is fine - but there's no need to be so verbose; the goal statement is just a summary of the question before the author launches into the backstory.

I'd go with something like this:

Goal: To remove the compiler warning 'CS0649' (field is never assigned to) when I use my custom attribute.

1
  • Thanks for the edit. Moot point now!
    – Flydog57
    Dec 12, 2018 at 0:59

You must log in to answer this question.

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