63 133
Assignments Done
99,1%
Successfully Done
In July 2018

Answer to Question #811 in C# for Richard

Question #811
How to initialize the class fields before calling of the constructor?
Expert's answer
One can use inline-initialization:
class
{
//inline initialization
ArrayList = new ArrayList();
public Test()
{
//The field array is already initialized
array.Add("1");
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions