Skip to content

Conversation

@kaylubr
Copy link

@kaylubr kaylubr commented Jan 11, 2026

No description provided.

Copy link
Owner

@TheCSharpAcademy TheCSharpAcademy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kaylubr Thanks for the submission! Your project is looking good but at the moment it doesn't meet this requirement:

image image

return [num1, num2];
}

public static string ValidateAnswer(string result)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Input Validation shouldn't be handled with exceptions. Wrong inputs/answers are not exceptions 😆. Better to handle this with a loop. I'll let you investigate how to achieve this.


public class Program
{
static List<dynamic> history = [];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a requirement, but the earliest you learn this the better. One of C#'s main strengths is that it's type strong. I recommend you create a custom type instead of using dynamic. Then your collection would be something like List history = new();

@TheCSharpAcademy TheCSharpAcademy self-assigned this Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants