Non-async "Task/Task<T)" methods should not return null. String offset-based methods should be preferred for finding substrings from offsets. Empty arrays and collections should be returned instead of null instead of Returning null. C# has a lot of information about different C# features.
Table of contents
1. Non-async "Task/Task<T>" methods should not return null2. Strings should not be concatenated using '+' in a loop3. String offset-based methods should be preferred for finding substrings from offsets4. Collections should not be passed as arguments to their own methods5. Empty arrays and collections should be returned instead of null6. Results of integer division should not be assigned to floating point variables7. Shared resources should not be used for locking8. Threads should not lock on objects with weak identity9. Neither "Thread.Resume" nor "Thread.Suspend" should be used10. Exceptions should not be explicitly rethrown11. Exceptions should not be thrown from unexpected methods12. General exceptions should never be thrown13. Exceptions should not be thrown in finally blocks14. Exception types should be "public"15. Destructors should not throw exceptions16. "IDisposables" created in a "using" statement should not be returned17. "operator==" should not be overloaded on reference types18. "Equals(Object)" and "GetHashCode()" should be overridden in pairs19. "GetHashCode" should not reference mutable fields20. "abstract" classes should not have "public" constructors21. Type inheritance should not be recursive22. "new Guid()" should not be used\n\n23. "GC.Collect" should not be called24. Sections of code should not be commented out1 Comment
Sort: