Friday, March 10, 2017

Best C# Practices to follow


  1. Always name things well.
  2. Make sure there is only one class per file.
  3. Always try to use properties instead of public variables.
  4. Write methods to make only one thing.
  5. Use public modifier only when necessary.
  6. Try to keep everything simple.
  7. Always be consistent.
  8. Use curly braces for if statement.
  9. Concatenate strings using "$".
  10. Avoid global variables.(Make use of app.config file to declare global variables if needed).

No comments:

Post a Comment

Call a function in child component from parent component in React

Consider the following parent component class Parent extends React.Component { constructor(props) { super(props);         thi...