
Below are some tips:-
1. User Connection Pooling
2. Implement a "Using" block to manage resources properly.
3. Never implement try-Catch within loop.
4. Choose best collection according to your purpose. Below are the list of fast first and so on...
-> List<int> or List<string>
-> int[] arr
-> Dictionary<int, int>
5. StringBuilder consumes less memory than String.
6. Use of String.Empty to check whether the string is null or not
7. Change your style of type casting. Below are the list of fast first and so on..
-> Base c = d as Base;
-> Base b = (Base) d;
8. Efficient string comparison method. Below are the list of fast first and so on..
-> if (Value.Equals("Sourav"))
-> if (Value == "Sourav")
Happy Coding,
If it helps you or directs U towards the solution,
MARK IT AS ANSWER Programmer123, if this helps please login to Mark As Answer. | Alert Moderator