Which name is more consistent with .NET naming standards for properties and methods?
1.
public string XRef { get; set; }
2.
public string Xref { get; set; }
Which name is more consistent with .NET naming standards for properties and methods?
1.
public string XRef { get; set; }
2.
public string Xref { get; set; }
I would say the first - the "X" is effectively a separate word (cross). This is a bit like the CData
class (and XCData
). It does look a bit odd, but I think it's worth indicating that the "R" is effectively the start of a word.
On the other hand, for a variable I'd probably use xref
rather than xRef
, simply because that latter looks really weird.
It depends on your code conventions, I think. I'd write XRef
because xref
is not one word, it contains X and Ref, and each word we should start with upper case letter.
According to the Design Guidelines for Class Libraries (http://msdn.microsoft.com/en-us/library/ms229043.aspx), I believe you'd end up with XRef
.
XRef
is not a compound word or common term.I think, in the end, it really depends on what your coding standards are.