Skip to content

Finished project #186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Finished project #186

wants to merge 2 commits into from

Conversation

mrgee1978
Copy link

Please critique my code and help me improve. A little disappointed that I did not feel I was able to do the challenges yet. But I will keep learning and improving.

@TheCSharpAcademy TheCSharpAcademy self-assigned this Mar 9, 2025
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.

@mrgee1978 Thanks for submitting and apologies for the delay! Unfortunately I ran into problems when trying to add a record. You should use TryParse or TryParseExact (recommended) instead of parse, otherwise computers with a different date format will get this error:
image

Could you please fix it so I can approve? 😄

@mrgee1978
Copy link
Author

@TheCSharpAcademy thank you so much for reviewing my code. On the method that threw the exception, I had already done a check to make sure that the date string passed to the method was a valid one in the GetValidDateString() method. I have been trying to recreate the problem by entering the date string that appears in your screen capture and it seems to work fine for me I don't get the exception, so I was wondering if there was anyway that you could tell me everything that you entered when trying to add a coding session. I want to understand exactly what I did wrong to cause it to throw an exception and this would help me tremendously so that I can refactor the code. Thank you so very much for all of your help.

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