www.bytehide.com

7 Common MISTAKES made by C# developers (+ How to ...

10/28/2021Updated 3/22/2026

Excerpt

## 1. Usage of String Concatenation String Concatenation Functions are really simple to use. When something is added to the string, a new address is **immediately created** in memory. The previous string is **transferred to the new section**, which now has a different location (this is not efficient at all). Let's see an example: … ## 2. Iterating with Values instead of with LINQ This problem happens when you attempt to iterate through a list of records using a loop, **which is not optimum.** … ## 5. Accessing Virtual Members within a Constructor Although this error is not one of the first, it is one of the **most common**, although it may not seem so. When an overridden method is called directly from the constructor of a base class, this **error will appear** because it comes from executing code before its time. … ## 6. Not knowing the importance of USING for Object Disposal As partech.nl says, many C# developers are +*unfamiliar* * with the concept that the using keyword is not only used as a directive for adding **namespaces**, but is also very beneficial for **object removal.** … ## 7. Using Weak Cryptographic Algorithms Here we agree with Stackify, this error is simply based on the fact that many developers use **obsolete** or **vulnerable encryption algorithms** (which is very easy to avoid). In this case we have for example SHA1 or RIPEMD160, which do not offer a current and very good level of security.

Source URL

https://www.bytehide.com/blog/7-common-mistakes-made-by-c-developers-how-to-avoid-them

Related Pain Points