How do I declare array of objects (in C#) ?
array of objects in C#
Collapse
X
-
Tags: None
-
you can create list of objects using following syntax
Code:Object[] obj=new Object[10]; //or List<object> lstObjects=new List<object>();
Code:using System.Collections.Generic;
-
Thanks.
I wrote :
System.Windows. Forms.Button [] buttons_list = new System.Windows. Forms.Button [10];
(ok)
and then, I wrote :
buttons_list[1] = button7 ;
and it complained:
buttons_list is a filed , but is used like a type
help !Comment
Comment