May 21, 2022
- Use conditional operator instead if-else
bool shouldProtect=hasApplication ? true : false;
you don't need to add true and false
* bool shouldProtect=hasApplication;
- Avoid modifications by using private members
you can use record is more better and less code
* record Laptop(string Os);