Iam preparing for my CLD certification, saw this code under the solution of the ATM application. Want to know whether it is fine to allow these coersion dots and also is there any way to avoid these.
Any other tips and examples for CLD certification will be appreciated.
Solved! Go to Solution.
These are references of different control types (Boolean, String, Cluster). Elements in an array have the same type, so input references must be converted to a type common to all (probably a generic Control).
So: no, you can't avoid it.
You can technically avoid them by using To More Generic Class, but it is not worth it. It may cost you 1/2 a point by the automatic standards, but a good reviewer will reverse that in this instance.
Thank you for your reply. I understand that but still i don't want to give any chance.
I am preparing for my CLD certification, saw this code under the solution of the ATM application.
Well, it would help to include a link to that "solution". Does it have comments? Is it considered a good solution or just some random solution?
The CLD example solutions are "passing" solutions. We are not given any idea of how close the solution was to failing.
This part of code was present under Solutions in the sample exams for CLD given by NI.