Conversation
kilozdazolik
left a comment
There was a problem hiding this comment.
Hi! Great job on the project, the calculator works perfectly and handles errors nicely!
I just left a couple of suggestions to make the code a bit cleaner.
Keep up the good work! 😁
| } | ||
| } | ||
|
|
||
| public void GetUsageCount() |
There was a problem hiding this comment.
You are iterating through the list to count the elements.
Lists in C# have a built-in .Count property which is much cleaner and more efficient. 😊
You could simply replace the loop with count = history.Count;
| public bool reusedResult = false; | ||
| public double reusedNumber = 0; | ||
|
|
||
| public void Function() |
There was a problem hiding this comment.
The method is doing a lot of things at once (getting input, validation, logic, displaying results). It makes it a bit hard to follow. Consider breaking it down into smaller helper methods, for example: GetValidNumber() could handle the input parsing loop separately. 😁
No description provided.