You are calling a member of a member - reidev275/SignsYouShouldProbablyRefactor GitHub Wiki
Example
void ConfigureRequest(HttpWebRequest request)
{
if (request == null) throw new ArgumentNullException("request");
request.Method = "POST";
request.Headers.Add("header", "value");
}
Why is this bad?
- Very easy for a null reference exception.
- Potentially confusing api. (Should I set the Headers property or call methods on the property?)
- Chance that we're operating at the wrong level of abstraction.