is it possible to accept more than one entires,as variables, and then change it to an array! as for example, the user would enter more than one name, but not defined how many names they should enter, and when I received the names I would change it to an array, is that possible ?
Thanks!
In .NET arrays have fixed length. If you want to be able to dynamically add elements to a list you could use the
List<T>class.For example:
Now you could start adding elements to the list:
And you could also get the corresponding fixed length array using the
ToArray()method: