![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Optimization Tips for C# Code
The following are the tips −
Prefer List
Use List whenever necessary. Working with ArrayList for the same work can make the working of code slower. This is specially if you are storing multiple types of objects within the same list.
Use multiplication-shift operation
Prefer multiplication-shift operation instead of division operator, since the usage of division operator slows the code.
Less code takes less memory
Try to get work done using operator to concise the code and make it work in a single line.
Use operators like && that would allow you to mention all the conditions in a single line.
Advertisements