When studying for my 70-536 exam (.NET Foundation) I came across the following:
Question:
You are developing an application to assist the user in conducting electronic surveys.
The survey consists of 25 true-or-false questions. You need to perform the following tasks:
- Initialize each answer to true.
- Minimize the amount of memory used by each survey.
Which storage option should you choose?
A. BitVector32 answers = new BitVector32(1);
B. BitVector32 answers = new BitVector32(-1);
C. BitArray answers = new BitArray(1);
D. BitArray answers = new BitArray(-1);
Ok, BitVector32 is preferred above BitArray, but I wasn't aware of the fact how to initialize all the values to true, I would have chosen A.
But then only the first answer would be true. So the correct answer is therefore B (BitVector32(-1)).
Blogging about Microsoft Fabric, Power BI, Power Platform and other things I find interesting.
Subscribe to:
Post Comments (Atom)
Featured Post
Power BI Gebruikersdagen 2026
Today, it's that time of year again! The Dutch Power BI Gebruikersdagen are here :-) Last year's keynote, photo credits by PBIG T...
-
Another post on my favorite topic: Governance and Administration! With all the Fabric announcements in the last months, some of the Admin an...
-
It's been a while since I've written on a regular cadance, so I'm picking up my favorite topic again: Governance and Administrat...
-
I'm picking up my favorite topic again: Governance and Administration! With all the Fabric announcements in the last months, some of the...
No comments:
Post a Comment
Thanks for taking the time to provide feedback!
Cheers,
Nicky