How to initialize the class fields before calling of the constructor?
1
Expert's answer
2010-10-21T08:23:27-0400
One can use inline-initialization: class { //inline initialization ArrayList = new ArrayList(); public Test() { //The field array is already initialized array.Add("1"); } }
Comments
Leave a comment