While Microsoft suggests to avoid using abbreviations in code, why do the system generated code of Event Handler contains following line?
private void TextBox1_TextChanged(object sender, EventArgs e)
Notice that "e" is in abbreviation. Does this rule not apply to Event Handlers?
Your question has been well-answered above, but I'll throw in my $0.02 on Hungarian Notation.
There is a great article that touches on Hungarian Notation Here. It addresses some misconceptions about Hungarian notation, in particular what is it supposed to be, as opposed to what it is often assumed to be.
The example in the answer from @Hiran is what is is often assumed to be, and Hiran is quite correct: putting the
str
prefix onstring strName
is redundant with a modern IDE.The main take-away from the linked article is from this paragraph:
I understand that Microsoft's guideline on not using Hungarian Notation was more about what it has become (prefixing the variable name with the variable type).
Thus, in the original intent, "Hungarian Notation" could be to use
string pName
(for 'productName') instead ofstring name
.As to the original question, the same declaration in Hungarian Notation might be more like:
Given that these
EventArgs e
are in the Event Handler, I'm not convinced such notation is particularly useful in this specific case.