Nested classes #703
Unanswered
akordowski
asked this question in
1. Q&A
Replies: 2 comments 1 reply
-
This design preference is used when nested types are only relevant within the enclosing class and should not be reused externally. The container class acts as a namespace. Nested classes often have generic or duplicate names, and placing them outside would make it harder to distinguish them from globally used classes. |
Beta Was this translation helpful? Give feedback.
1 reply
-
As the function is called |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Working with the KM I have seen that there are cases where nested classes are used as property types, eg
DocumentUploadRequest.UploadedFile
:As this is very unusual regarding the overall library design, I was wondering if there is any architectural reason for this? IMO it's harder to find the type and breaks the developer expirience.
Beta Was this translation helpful? Give feedback.
All reactions