Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# array of class objects initialization with constructor

MyClass[] testobjlist = new MyClass[] 
{
     new MyClass(1001,1234,"Text 1", "abcdefghijklm", "ding"),
     new MyClass(1002,2345,"Text xx", "bla bla", "dong"),
     new MyClass(1003,8653,"Text yy", "blah blah even more", "bamm!")
};
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #array #class #objects #initialization #constructor
ADD COMMENT
Topic
Name
1+2 =