While we appreciate comments from our users, please follow our posting guidelines. Have you tried the Cyotek Forums for support from Cyotek and the community?
Styling with Markdown is supported
23 September 2019 Reply
I really appreciate your excellent articles ! I notice that on this page the code for 'Parse is not visible; in the actual code, you never use the version of 'TryParse you define.
If you are going to take this further, I'd really enjoy seeing an example with a Dictionary of Enum Values (keys) and Colors (values) that you can edit in the PropertyGrid.
26 September 2019 Reply
Thanks for the comment! As is my habit, I wrote this demonstration program whilst writing the article itself. Originally I was doing TryParse, but as I was writing that part of the article my brain kicked in and reminded me that silently ignoring user input is a silly idea. So I changed it to Parse instead to get the exception, but plain forgot to change the signature at the start of the article. Fortunately the downloadable sample contains everything and is correct. The class is based on an actual type I wrote for another project. I do actually have one more part to write based on some other experiences (and it just so happens one of these is for a custom Color type) so hopefully you'll enjoy the next part too.
Thanks again for the comments, it's a pleasure to get a decent comment instead of the usual buckets of spam this blog attracts.