6 kyu
Reflection #2 - Give me all methods
384user5036852
Loading description...
Fundamentals
Object-oriented Programming
Reflection
Metaprogramming
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Do something about the error message. Print the expected method names. Also, why does (all) methods not include "ReferenceEquals" or any other method in the flatten hierarchy?
C# 8 should be enabled.
Done
I have a problem during solving that kata could someone help me?
Different count of Methods 6 vs 9 Expected and actual are both <System.Linq.OrderedEnumerable`2[System.String,System.String]> Values differ at index [2] Expected string length 8 but was 11. Strings differ at index 0. Expected: "Finalize" But was: "GetHashCode" -----------^
It seems your solution does not return some methods. The class has 9 methods, but your function returned only 6 of them. Three more are missing.
I had never dealt with reflection before, and beyond being aware of the term I had no idea what it actually was.
It took me far too long to figure out how to return ALL of the methods and I learned way more because of it, good call on that one.
Great! :-)
Thanks for the educational Kata; I thoroughly enjoyed it and learned quite a lot about reflection in C# :D Prior to this Kata, I only knew reflection in PHP which isn't quite the same as C# :p
would be very usefull/nice to have that serie in java too... !
Thanks, Donald! :-)