Answer the question
In order to leave comments, you need to log in
How to count the number of child objects?
Good afternoon friends.
There is a parent object that contains child objects. I need to count them. Can you please tell me if this can be done and how?
Thank you.
Answer the question
In order to leave comments, you need to log in
Hi, can you show the code?
If you have a class object and you need to count the number of fields, then you need to use reflection (but something doesn’t come to mind why you need it)
If you have arrays or lists, then there are methods for working with them, or you can use linq.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question