Here are a few examples with comments showing what is good and what is bad practice:
var customerInfo = RetrieveCustomerInfo(customerId); // Bad, not readable
CustomerInfo customerInfo = RetrieveCustomerInfo(customerId); //Good
var settings = GetInboxSettings(); // Bad, not readable
InboxSettings settings = GetInboxSettings(); // Good
Dictionary<string, List<string>> myDictionary = new Dictionary<string, List<string>>(); // redundant
var myDictionary = new Dictionary<string, List<string>>(); // OK
Almir M.
#Csharp #DotNet #programming #code #coding #SoftwareDevelopment #SoftwareEngineering
No comments:
Post a Comment