Overblog
Edit page Follow this blog Administration + Create my blog

1. String concatenation instead of StringBuilder: When a software developer enters into the industry he has a habit of using string concatenation in asp .net just like he does in C and C++. But here the situation is different. In asp .net when we concatenate a string with a older one the entire new string get transferred to a new location and this process goes on as a result it leads to an inefficient process. To avoid this, there is a StringBuilder i.e., it enables the concatenation process that occur on the same location of the address leading to an efficient programming.



2. LINQ: While dealing with LINQ, programmers usually return the data to the first occurrence using “First” method but sometimes the “First” method doesn’t reside in the program. As a result an exception will be thrown. As a good asp .net developer, you should use “FirstOrDefault” so that the default value for the type will be returned and there will be no exception.

3. Mapping for rewriting properties: While dealing with a big data asp application, the developer many types need to write a property definition repeatedly. In that case as an efficient asp .net developer you should take the help of mapping tools like Automapper etc for more efficiency and accuracy.

4. Not using “using”: Using is a vital key word in C# but many asp .net developers are not aware of the same. It can be used not only for addition of namespaces but also for disposing objects. Though developers usually use it for the first case but they hesitate to use it for the second situation. So you should avoid hesitation to use “using” for disposing objects.

5. Use “foreach” instead of for: When you are aware of the number of elements in the array, you can use for loop. But this is not an efficient way of programming. Because this habit may lead to fatal situation in the course of application development. Hence you should use “foreach” to avoid all types of critical situations.

6. Unnecessary db calls: Usually new asp .net developers make multiple calls to the database unnecessarily while programming in C#. They think it will help in more accurate database operation. But they unaware of the unnecessary load on the server. Hence you must avoid multiple db calls.

7. Misunderstanding default value for uninitialized variables: When we write programme in C#, many times we deal with variables which are uninitialized. While checking the values of those uninitialized variables we think it is a null value but this is not the true case. Because C# adds a value to every uninitialized variables unlike in case of a class.

8. Improper string comparison: Usually new asp .net developers implement “==” operator to compare two strings. But, this is not at all accepted from a good developer. You should use “equals” method for the same.

9. Allowing Complier Warnings: While working with any programming language, developers usually don’t bother much about the warnings. But it is really a bad practice. Before you over look any warning you must know the reason behind. So you should be careful while avoiding any type of warning in your application during compilation.

10. Use exception handler: Usually developers are over confident while programming their application and they forget to implement exception handler in the programme. This is really a bad practice and a good asp .net developer must use exception handler in his application in every required stage. To get maximum benefits of .Net, you may consider hiring services of acustom .net development company.

We provide .net application development services. If you would like to talk to one of our certified .net developers, please get in touch with us at Mindfire Solutions.

Tag(s) : #DotNet
Share this blog
Repost0
To be informed of the latest articles, subscribe: