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
My DataGrillen Adventure: Speaking, Connecting, and New Friendships
I just got back from an incredible trip to DataGrillen, and I can’t wait to share my experiences with you. If you haven’t heard of it, Data...
-
Just before the holidays start, I'd like to share this little trick I came across in Power Query. I recently had the need to remove zero...
-
After Installing the PowerShell Power BI Management cmdlets a few months back, I finally managed to get a dataset refresh working, initiat...
-
I recently made the switch to Pulse (you can read about it here ), so I am working with lots of new clients lately. One of those clients wa...
No comments:
Post a Comment
Thanks for taking the time to provide feedback!
Cheers,
Nicky