50 key points for improving C # programming (2)

Source: Internet
Author: User

26. Implement icomparable and icomparer interfaces for objects to be sorted
27. Avoid using the icloneable Interface
28. Avoid using the type conversion Operator
29. The new operator is required only when the base class has the same name as the existing function in the derived class.
30. Try to use CLS-compliant
31. Try to write short and simple functions
32. Try to write a smaller assembly)
33. Define type visibility (visibility)
34. Compile a large-granularity web API
35. When using events, the base-class events are inherited first, instead of re-creating an event.
36. debug (debug, Trace, Eventlog, etc.) when using the framework)
37. Use the. NET standard configuration Mechanism
38. Use and support the. NET data binding function in the class)
39. Use the. NET authentication mechanism (validation)
40. Select the correct collection class based on your needs)
41. Use dataset in the Custom Structure
42. Attributes)
43. Do not over-use reflection (reflection)
44. Create a complete application-specific exception
45. Consider as many exceptions as possible and handle them.
46. Use InterOP as few as possible
47. Try to use safe code)
48. Learn more and use external tools and resources
49. Prepare to use C #2.0.
50. Learn ECMA standards

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.