01 2016 档案

C# Coding & Naming Conventions
摘要:Reference documenthttps://msdn.microsoft.com/en-us/library/ff926074.aspxhttps://msdn.microsoft.com/en-us/library/ms229045(v=vs.110).aspxCoding Convent... 阅读全文

posted @ 2016-01-26 14:48 戒日王 阅读(347) 评论(0) 推荐(0)

C# Best Practices - Handling Strings
摘要:FeaturesStrings Are Immutable.A String Is a Reference TypeValue TypeStore their data directlyExample: int, decimal, bool, enumReference TypeStore refe... 阅读全文

posted @ 2016-01-26 11:54 戒日王 阅读(167) 评论(0) 推荐(0)

C# Best Practices - Specify Clear Method Parameters
摘要:Improve parametersparameter orderpublic OperationResult PlaceOrder(Product product, int quantity, bool includeAddress, bool sendCopy)Acted opon or key... 阅读全文

posted @ 2016-01-22 11:54 戒日王 阅读(289) 评论(0) 推荐(0)

C# Best Practices - Creating Good Methods
摘要:How to Define a MethodIdentify the problem => Define the single purpose => Specify the inputs and outputs => State any assumptions => Consider the err... 阅读全文

posted @ 2016-01-14 11:42 戒日王 阅读(246) 评论(0) 推荐(0)

C# Best Practices - Creating Good Properties
摘要:Coding PropertiesCode in the GetterCheck the user's credentialsCheck application stateFormat the returned valueLogLazy Loading related data/objectCode... 阅读全文

posted @ 2016-01-12 18:18 戒日王 阅读(175) 评论(0) 推荐(0)

C# Best Practices - Define Fields Appropriately
摘要:Backing Fields private string description; private int productId; Features A variable in a class Holds data for each object Object's data is only acce 阅读全文

posted @ 2016-01-12 17:38 戒日王 阅读(177) 评论(0) 推荐(0)

C# Best Practices - Accessing and Using Classes
摘要:References and UsingDo:Take care when defining referencesReferences must be one way (or circular dependency error)Take advantage of the using directiv... 阅读全文

posted @ 2016-01-07 15:52 戒日王 阅读(171) 评论(0) 推荐(0)

C# Best Practices - Building Good Classes
摘要:Building a ClassThe last four refer as membersSignatureAccessiblity modifier (Default:internal)class keywordClass NameXML documents commentsFieldsA va... 阅读全文

posted @ 2016-01-07 11:24 戒日王 阅读(215) 评论(0) 推荐(0)

C# Best Practices - Define Proper Classes
摘要:Application Architecture Define the components appropriately for the application and create project for each one. What is Class? 3 Things: Visual Thin 阅读全文

posted @ 2016-01-05 18:33 戒日王 阅读(357) 评论(1) 推荐(0)

导航