C
C
Chamyys2018-08-31 11:29:07
ASP.NET
Chamyys, 2018-08-31 11:29:07

How to set the list model in a loop?

Good afternoon! I have a model which is a list of parameters. Can I somehow populate its instance with a loop?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sunblossom, 2018-08-31
@Chamyys

If parameters lie in a collection or an array - yes.
If specified as fields and properties - no. Well, or you need to add your own indexer, which will have a switch with all the necessary fields and properties with access by number.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question