Limited Sale 30% Off - Ends in 48:00:00

Microsoft 70-483 Exam Practice Test Questions

Unlimited Access

Try Unlimited Access to the ALL Exam-Labs PREMIUM VCE Files, Training Courses and Study Guides!

Take advantages of unlimited access to ALL Exam-Labs products & Get Certified Easily!

  • Guaranteed to have Latest Exam Questions
  • 100% Accurate & Verified Answers
  • Fast Free Updates to Cover Latest Pool of Questions
  • Instant Download
  • 98.4% Pass Rate

Subscription options

Please select your preferred subscription below:

Total Due: $89.99

Subscription options

Please select your preferred subscription below:

Total Due: $89.99

Questions & Answers for Microsoft 70-483

Showing 1-100 of 236 Questions

Question #1 - Topic 1

You are developing code for a class named Account. The Account class includes the
following method:

You need to ensure that overflow exceptions are thrown when there is an error.
Which type of block should you use?

A. checked
B. try
C. using
D. unchecked

Comments for Question #1 - Topic 1 (11)

May 15, 2018, 11:34 AM
A. Checked
March 9, 2018, 09:39 PM
A
March 9, 2018, 09:39 PM
A
November 14, 2017, 07:11 AM
Can I really put some comments here?
October 18, 2017, 05:42 PM
Here is the answer for this question: https://msdn.microsoft.com/en-us/library/khy08726(v=vs.110).aspx
October 12, 2017, 06:28 PM
Is the extraCents variable a member of the class? I thought it would be prefixed with this. (I know it is not the aim of the question :) )
September 12, 2017, 12:31 PM
A
July 31, 2017, 11:09 PM
checked https://docs.microsoft.com/fr-fr/dotnet/csharp/language-reference/keywords/checked
July 19, 2017, 06:46 PM
A. Checked
June 4, 2017, 06:27 AM
"For the arithmetic, casting, or conversion operation to throw an OverflowException, the operation must occur in a checked context. By default, arithmetic operations and overflows in Visual Basic are checked; in C#, they are not. If the operation occurs in an unchecked context, the result is truncated by discarding any high-order bits that do not fit into the destination type. " Source: https://msdn.microsoft.com/en-us/library/system.overflowexception(v=vs.110).aspx
May 28, 2017, 10:29 PM
I thought an overflow exception would be caught using a "try catch" block. I was wrong.

Question #2 - Topic 1

You are developing an application in C#.
The application will display the temperature and the time at which the temperature was
recorded. You have the following method (line numbers are included for reference only):

You need to ensure that the message displayed in the lblMessage object shows the time
formatted according to the following requirements:
✑ The time must be formatted as hour:minute AM/PM, for example 2:00 PM.
✑ The date must be formatted as month/day/year, for example 04/21/2013.
✑ The temperature must be formatted to have two decimal places, for example 23-
45.
Which code should you insert at line 04? (To answer, select the appropriate options in the
answer area.)

Comments for Question #2 - Topic 1 (19)

July 30, 2018, 11:50 AM
output = string.Format("Temperature at {0:t} on {0:dd/mm/yy} ", date, temp) {1:N2}
July 30, 2018, 11:49 AM
output = string.Format("Temperature at {0:t} on {0:dd/mm/yy} ", date, temp) {1:N2}
July 9, 2018, 03:48 PM
dateLbl.Text = string.Format("Time is {0:t} on day {0:MM/dd/yyyy}", DateTime.Now); 0 refers to the first parameter (in the example, 0 refers to datetime, 1 refers to double). t refers to "9:47 AM", MM is month (mm is minutes), dd is day, yyyy is year in "2018" format, yy is year in "18" format
June 7, 2018, 12:37 PM
Correct answer is {0:t} - you want the parameter at index 0 and only "t" can provide AM/PM {0:d} - again index 0 and date. Other answers are incorrect, as small "mm" means minutes, not Months(MM). {1:N2} - take parameter at index 1 and N2 means 2 decimal places. You can check if you execute Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); beforehand.
April 23, 2018, 02:46 AM
Answer should be output= String.Format("Temperature at {0:t} on {0:MM/dd/yyyy} {1:N2}", date, temp) "t" in a format will format to 12 hour clock with AM/PM the requirements as for month/day/year so the choices are all wrong. {0:d} is culture sensitive so {0:d} would work if that is what the machine was set to. On my machine {0:d} is dd/MM/yyyy {1:d} is trying to use temp {0:dd/mm/yy} has both the month and day in the wrong position for the requirements and year is only 2 digits. {0:mm/dd/yy} has only a 2 digit year. The {1:N2} must be inside the actual string.
March 27, 2018, 05:02 AM
different culture, return different format when use {0:t} {1:N2}
March 21, 2018, 08:07 AM
The answer is for ENGLISH environment. If my OS is Chinese, the answer is wrong.
March 11, 2018, 01:22 PM
Can anyone explain about About temperature: {1:N2} ??
November 28, 2017, 02:06 AM
when I tested only "{0:t} {0:d} {1:N2}" gives the answer matches with the requirement.
November 17, 2017, 01:07 PM
About temperature: {1:N2} produce 23.45 not 23-45
November 14, 2017, 11:35 PM
The answer to this question is wrong. The correct format is {0:MM/dd/yyyy}
November 8, 2017, 10:16 AM
Like many comments below addressed the answer should be {0:t}, {0:mm/dd/yy} and {1:N2} but there is no choice like that.
October 26, 2017, 04:50 AM
string.Format("Temperature at {0:hh:mm tt} {0:MM/dd/yyyy} on {1:N2}", date, temp);
October 26, 2017, 04:49 AM
output = string.Format("Temperature at {0:hh:mm tt} {0:MM/dd/yyyy} on {1:N2}", date, temp);
October 13, 2017, 10:36 AM
And what about the {1:N2} outside of the brackets?
October 12, 2017, 06:32 PM
I think if you chose {0:dd/mm/yy}, you will have the "minute" part of the DateTime(to have the "month" part, you need to put "MM"), and the year will be displayed on 2 digits, not on 4, as required in your example.
September 16, 2017, 04:21 PM
should the second part be {1:mm/dd/yy} ??
September 14, 2017, 09:20 AM
The best answer according to the choices is "{0:t}", "{0:d}" and "{1:N2}".
September 13, 2017, 09:06 PM
If it is month/day/year, how is that the format in the answer puts the day first?

Question #3 - Topic 1

You are developing an application that includes a class named Order. The application will
store a collection of Order objects.
The collection must meet the following requirements:
✑ Use strongly typed members.
✑ Process Order objects in first-in-first-out order.
✑ Store values for each Order object.
✑ Use zero-based indices.
You need to use a collection type that meets the requirements.
Which collection type should you use?

A. Queue<T>
B. SortedList
C. LinkedList<T>
D. HashTable
E. Array<T>

Comments for Question #3 - Topic 1 (2)

November 18, 2017, 12:49 PM
For the use zero-based indices requirement I supposed we shall consider the queue.ElementAt(i), shalln't we?
November 3, 2017, 09:17 PM
The opening bracket < is only displayed with &lt; at my side...

Question #4 - Topic 1

You are developing an application that includes the following code segment. (Line numbers
are included for reference only.)

The GetCustomers() method must meet the following requirements:
✑ Connect to a Microsoft SQL Server database.
✑ Populate Customer objects with data from the database.
✑ Return an IEnumerable&lt;Customer> collection that contains the populated
Customer objects.
You need to meet the requirements.
Which two actions should you perform? (Each correct answer presents part of the solution.
Choose two.)

A. Insert the following code segment at line 17: while (sqlDataReader.GetValues())
B. Insert the following code segment at line 14: sqlConnection.Open();
C. Insert the following code segment at line 14: sqlConnection.BeginTransaction();
D. Insert the following code segment at line 17: while (sqlDataReader.Read())
E. Insert the following code segment at line 17: while (sqlDataReader.NextResult())

Comments for Question #4 - Topic 1 (3)

July 19, 2018, 02:47 PM
The default position of the SqlDataReader is before the first record. Therefore, you must call Read to begin accessing any data.
November 2, 2017, 03:41 PM
Isn't the SqlConnection already open thanks to the using statement?
September 13, 2017, 09:09 PM
We cannot read until the reader is executed

Question #5 - Topic 1

You are developing an application that will process orders. The debug and release versions
of the application will display different logo images.
You need to ensure that the correct image path is set based on the build configuration.
Which code segment should you use?

A. Option A
B. Option B
C. Option C
D. Option D

Comments for Question #5 - Topic 1 (2)

November 20, 2017, 02:51 PM
I don't use any of the listed options because if your solution is in debug mode then anything in the #else isn't evaluated by the IDE for syntax errors. So if the name "imgPath" ever changes and you are in debug mode then you will get a syntax error in the #if block but not the #else block. Better use case is to set a local debug boolean in the #if structure and use that to dictate what to do instead so that the relevant code is always being scanned for syntax errors.
November 2, 2017, 04:38 AM
It's about precompiler.

Question #6 - Topic 1

You are creating an application that manages information about zoo animals. The
application includes a class named Animal and a method named Save.
The Save() method must be strongly typed. It must allow only types inherited from the
Animal class that uses a constructor that accepts no parameters.
You need to implement the Save() method.
Which code segment should you use?

A. Option A
B. Option B
C. Option C
D. Option D

Comments for Question #6 - Topic 1 (3)

April 5, 2018, 05:29 PM
So what's the difference or why C is correct and not B?
November 17, 2017, 08:00 PM
When used together with other constraints, the new() constraint must be specified last. Reference: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/generics/constraints-on-type-parameters
November 14, 2017, 11:34 AM
Am I wrong? I cannot understand this even after reading 3time of the answer link.

Question #7 - Topic 1

You are debugging an application that calculates loan interest. The application includes the
following code. (Line numbers are included for reference only.)

You have the following requirements:
✑ The debugger must break execution within the Calculatelnterest() method when
the loanAmount variable is less than or equal to zero.
✑ The release version of the code must not be impacted by any changes.
You need to meet the requirements.
What should you do?

A. Insert the following code segment at tine 05: Debug.Write(loanAmount > 0);
B. Insert the following code segment at line 05: Trace.Write(loanAmount > 0);
C. Insert the following code segment at line 03: Debug.Assert(loanAmount > 0);
D. Insert the following code segment at line 03: Trace.Assert(loanAmount > 0);

Comments for Question #7 - Topic 1 (3)

April 10, 2018, 07:43 PM
"The release version of the code must not be impacted by any changes." Debug.Assert will only work if code is executing in Debug mode. Correct answer should be D - Trace.Assert
October 31, 2017, 11:44 AM
c
October 11, 2017, 08:09 AM
.. how to understand : “The release version of the code must not be impacted by any changes.” ? We should understand as: "Release version must not execute the code."

Question #8 - Topic 1

You are developing an application that includes a class named Customer.
The application will output the Customer class as a structured XML document by using the
following code segment:

You need to ensure that the Customer class will serialize to XML.
How should you complete the relevant code? (To answer, drag the appropriate code
segments to the correct locations in the answer area. Each code segment may be used
once, more than once, or not at all. You may need to drag the split bar between panes or
scroll to view content.)

Comments for Question #8 - Topic 1 (3)

May 28, 2018, 01:30 PM
Working example to test out and play around using System; using System.Xml.Serialization; namespace Preparing_for_70_483 { class Program22 { static void Main(string[] args) { XMLSerializeTest xmltest = new XMLSerializeTest(); var stringwriter = new System.IO.StringWriter(); xmltest.DateOfBirth = DateTime.UtcNow; xmltest.Id = System.Guid.Parse("00000000-0000-0000-0000-000000000000"); xmltest.Name = "John Kohn"; XmlSerializer s = new XmlSerializer(xmltest.GetType()); s.Serialize(stringwriter, xmltest); Console.WriteLine(stringwriter.ToString()); Console.ReadLine(); } } [XmlRoot("Prospect", Namespace = "http://prospect")] public class XMLSerializeTest { [XmlAttribute("ProspectId")] public Guid Id { get; set; } [XmlElement("FullName")] public string Name { get; set; } public DateTime DateOfBirth { get; set; } [XmlIgnore] public int Tin { get; set; } } }
March 19, 2018, 06:03 AM
shouldn't there be [XmlElement("DateofBirth")]???
July 2, 2017, 05:02 PM
{XmlRoot ("Prospect", Namespace = "http://prospect")} [XmlAttribute ("ProspectId")] [XmlElement ("FullName")] [XmlIgnore]

Question #9 - Topic 1

You are developing an application that includes a class named Order. The application will
store a collection of Order objects.
The collection must meet the following requirements:
✑ Internally store a key and a value for each collection item.
✑ Provide objects to iterators in ascending order based on the key.
✑ Ensure that item are accessible by zero-based index or by key.
You need to use a collection type that meets the requirements.
Which collection type should you use?

A. LinkedList
B. Queue
C. Array
D. HashTable
E. SortedList

Question #10 - Topic 1

You are developing an application that uses structured exception handling. The application
includes a class named ExceptionLogger.
The ExceptionLogger class implements a method named LogException by using the
following code segment:
public static void LogException(Exception ex)
You have the following requirements:
✑ Log all exceptions by using the LogException() method of the ExceptionLogger
class.
✑ Rethrow the original exception, including the entire exception stack.
You need to meet the requirements.
Which code segment should you use?

A. Option A
B. Option B
C. Option C
D. Option D

Question #11 - Topic 1

You are testing an application. The application includes methods named CalculateInterest
and LogLine. The CalculateInterest() method calculates loan interest. The LogLine()
method sends diagnostic messages to a console window.
You have the following requirements:
✑ The CalculateInterest() method must run for all build configurations.
✑ The LogLine() method must be called only for debug builds.
You need to ensure that the methods run correctly.
How should you complete the relevant code? (To answer, drag the appropriate code
segments to the correct locations in the answer area. Each code segment may be used
once, more than once, or not at all. You may need to drag the split bar between panes or
scroll to view content.)

Question #12 - Topic 1

You are developing an application that accepts the input of dates from the user.
Users enter the date in their local format. The date entered by the user is stored in a string
variable named inputDate. The valid date value must be placed in a DateTime variable
named validatedDate.
You need to validate the entered date and convert it to Coordinated Universal Time (UTC).
The code must not cause an exception to be thrown.
Which code segment should you use?

A. Option A
B. Option B
C. Option C
D. Option D

Comments for Question #12 - Topic 1 (1)

April 9, 2018, 07:21 AM
Why the other answers are not valid?

Question #13 - Topic 1

You are developing an application that uses a .config file.
The relevant portion of the .config file is shown as follows:

You need to ensure that diagnostic data for the application writes to the event tog by using
the configuration specified in the .config file.
What should you include in the application code?

A. Option A
B. Option B
C. Option C
D. Option D

Comments for Question #13 - Topic 1 (4)

November 2, 2017, 05:17 AM
Here is the answer: https://msdn.microsoft.com/en-us/library/system.diagnostics.eventlogtracelistener(v=vs.110).aspx
October 15, 2017, 12:33 AM
Trace updates EventLog. Reference : C# 6.0 in a Nutshell.
August 3, 2017, 06:10 PM
Answer D is correct . Not Eventlog
May 3, 2017, 04:24 PM
event tog => event log

Question #14 - Topic 1

An application includes a class named Person. The Person class includes a method named
GetData.
You need to ensure that the GetData() from the Person class.
Which access modifier should you use for the GetData() method?

A. Internal
B. Protected
C. Private
D. Protected internal
E. Public

Comments for Question #14 - Topic 1 (8)

July 24, 2018, 12:24 PM
Based on the question, there is no correct answer. Please fix this as it is unclear what the desired accessibility is of the method.
April 17, 2018, 09:30 PM
This is an incomplete question
August 16, 2017, 01:48 PM
"You need to ensure that the GetData() from the Person class." => That's an incomplete sentence
August 8, 2017, 07:07 AM
Question asks: "You need to ensure that the GetData() from the Person class." ??? Something is missing! From the answer I suppose it should be "You need to ensure that the GetData() can only be called from the Person class itself or classes derived from the Person class."
July 7, 2017, 11:46 PM
Team Exam-Labs when they are going to correct this question?
June 23, 2017, 04:28 PM
correct because if you have a class as Employee derived from Person, you will still able to GetData() because Employee is Person
May 3, 2017, 04:28 PM
"You need to ensure that the GetData() from the Person class." misses some information like "You need to ensure that the GetData() can only be called from the Person class.".
April 30, 2017, 10:48 AM
Question is not complete.

Question #15 - Topic 1

You are developing an application that will include a method named GetData. The
GetData() method will retrieve several lines of data from a web service by using a
System.IO.StreamReader object.
You have the following requirements:
✑ The GetData() method must return a string value that contains the entire response
from the web service.
✑ The application must remain responsive while the GetData() method runs.
You need to implement the GetData() method.
How should you complete the relevant code? (To answer, drag the appropriate objects to
the correct locations in the answer area. Each object may be used once, more than once,
or not at all. You may need to drag the split bar between panes or scroll to view content.)

Comments for Question #15 - Topic 1 (12)

August 1, 2018, 01:48 AM
The question says the method must return a string. The method doesn't return anything. Why not save some context switching and CPU cycles by just calling abort after the app starts.
May 29, 2018, 03:32 AM
return type is string , public async string GetData(WebResponse response) "The GetData() method must return a string value that contains the entire response from the web service." await is double..
April 26, 2018, 04:58 PM
The method must return a string, see 1. requirement. Therefore how could it be void? The double await keyword is also typo.
April 23, 2018, 11:46 AM
With two await it doesn't compile.
April 17, 2018, 09:30 PM
await is used twice... This question is a mistake
March 12, 2018, 07:50 PM
There are missing options to drag
November 11, 2017, 02:33 PM
async await ReadToEndAsync();
November 11, 2017, 02:33 PM
async await ReadToEndAsync();
November 2, 2017, 06:32 AM
it will be urlText= await await sr.ReadToEndAsync(); then??? there will be 2 await on the same method call, right?
October 12, 2017, 07:01 PM
I would have returned a Task object, not void (I mean public async Task...)
September 24, 2017, 01:29 PM
the double "await" operator is intentionally or its an wrong?
September 13, 2017, 06:36 PM
I believe ReadLineAsync() should be there at ReadToEndAsync()

Question #16 - Topic 1

You are adding a public method named UpdateScore to a public class named ScoreCard.
The code region that updates the score field must meet the following requirements:
✑ It must be accessed by only one thread at a time.
✑ It must not be vulnerable to a deadlock situation.
You need to implement the UpdateScore() method.
What should you do?

A. Option A
B. Option B
C. Option C
D. Option D

Comments for Question #16 - Topic 1 (1)

August 25, 2018, 01:59 PM
B is the best answer, but doesn't the private lockObject also need to be static, i.e. private static Object lockObject; ?

Question #17 - Topic 1

You are developing an application by using C#.
The application includes an object that performs a long running process.
You need to ensure that the garbage collector does not release the object's resources until
the process completes.
Which garbage collector method should you use?

A. ReRegisterForFinalize()
B. SuppressFinalize()
C. Collect()
D. WaitForFullGCApproach()

Comments for Question #17 - Topic 1 (13)

August 20, 2018, 10:27 AM
B
August 20, 2018, 10:27 AM
B
May 29, 2018, 09:09 AM
I think this might be a multiple choice question, simply not added as such. You should use both. SuppressFinalize() to start with, and Collect() when the process has ended, to manually override garbage collection process. https://msdn.microsoft.com/en-us/library/system.gc(v=vs.110).aspx
May 10, 2018, 09:31 PM
B is right for sure! Check microsoft libraries.
November 2, 2017, 05:32 AM
The correct answer is C = Collect() According to the 70-483 book Page 176 - "Collect will execute a garbage collection, freeing as much memory as possible at that time, which can be a very expensive process. This won't prevent the garbage collector from executing during your time-sensitive code, but it will make it less likely to happen."
October 30, 2017, 07:53 PM
c
September 13, 2017, 02:13 PM
SuppressFinalize()
August 3, 2017, 01:49 AM
correct answer will be C..
July 29, 2017, 09:40 PM
Se Question 95. KeepAlive() is the correct answer.
July 28, 2017, 08:04 PM
I'm pretty sure the answer is C. SuppressFinalize() doesn't actually prevent garbage collection, it only prevents Finalize from being called (usually used to close resources) before garbage collection. I don't think there is a way to tell the GC to stop, but Collect() will reduce the chances and maximize available resources before the task starts.
July 2, 2017, 06:35 PM
SuppressFinalize()
June 30, 2017, 08:24 AM
From my perspective C is correct. Very confuse question. In book is written: " Collect will execute a garbage collection, freeing as much memory as possible at that time, which can be a very expensive process. This won’t prevent the garbage collector from executing during your time-sensitive code, but it will make it less likely to happen. " ...
May 14, 2017, 09:58 AM
Completely wrong. SupressFinalize() is called from Dispose to prevent the call of the Finalizer on an object of a class which has on declared. It will not prevent garbage collection on the object.

Question #18 - Topic 1

You are developing an application that includes the following code segment. (Line numbers
are included for reference only.)

You need to ensure that the application accepts only integer input and prompts the user
each time non-integer input is entered.
Which code segment should you add at line 19?

A. If (!int.TryParse(sLine, out number))
B. If ((number = Int32.Parse(sLine)) == Single.NaN)
C. If ((number = int.Parse(sLine)) > Int32.MaxValue)
D. If (Int32.TryParse(sLine, out number))

Comments for Question #18 - Topic 1 (3)

October 19, 2017, 06:00 PM
This doesn't give an explanation for why D is not the correct answer. The reason why it's wrong is because of the resulting flow options after we check the result of the TryParse operation. TryParse returns 1 if the operation succeeds, 0 if it fails. If the operation succeeds we don't want to return false from the function, we want to assign the value of "val" and return true. Hence the correct answer is A.
August 8, 2017, 07:12 AM
Executed the code in visual studio and found the correct answer as 'D' because TryParse() returns 0 if conversion failed.In this code we should return false if conversion failed hence correct answer is D.
July 2, 2017, 06:38 PM
If(!Int.TryParse(sLine, out number))

Question #19 - Topic 1

You are developing an application by using C#. The application will process several objects
per second.
You need to create a performance counter to analyze the object processing.
Which three actions should you perform in sequence? (To answer, move the appropriate
actions from the list of actions to the answer area and arrange them in the correct order.)

Comments for Question #19 - Topic 1 (1)

May 29, 2018, 10:48 AM
Answer is correct, I have tested it and verified in Performance Monitor counters list with following code: using System.Diagnostics; namespace Preparing_for_70_483 { class CounterLockTest { public static void Run() { CounterCreationDataCollection collection = new CounterCreationDataCollection(); CounterCreationData item = new CounterCreationData(); item.CounterName = "Test Counter"; collection.Add(item); PerformanceCounterCategory.Create("Egils", "Egils Category help", System.Diagnostics.PerformanceCounterCategoryType.SingleInstance, collection); } } }

Question #20 - Topic 1

You are reviewing the following code:

For each of the following statements, select Yes if the statement is true. Otherwise, select
No.

Comments for Question #20 - Topic 1 (23)

February 6, 2019, 02:53 AM
YES, YES, YES, Here is proof: https://dotnetfiddle.net/WCiCmL
July 10, 2018, 02:12 PM
Correct answers is: \n a) yes. Because of the FlagAttribute we can work with bit fields\nvar user = new User();\nuser.UserGroup = Group.Users | Group.Supervisor;\nb) yes.\nc) yes.
March 26, 2018, 08:22 PM
NO, YES, YES seguro.
March 24, 2018, 08:30 AM
Answer is Yes, No, Yes
March 23, 2018, 04:41 PM
All is Yes , for third yes as it treated as int values , for first try below : var user = new User(); user.groub= Group.Users | Group.Supervisors; Console.WriteLine(user.groub); if ((user.groub & Group.Supervisors) ==Group.Supervisors) Console.WriteLine("true");
March 7, 2018, 06:13 PM
On Object Creation, user.UserGroup = 0 Group.Administrator = 8 So, the answer will be 1. NO 2. NO 3. YES
March 5, 2018, 12:31 PM
Yes, Yes, Yes. Explanation: (1) A user can be member of more than one group by setting e.g. user.UserGroup = Group.Users | Group.Supervisors; In this case the user is considered member of Users and Supervisors. (2) If you did the following user.UserGroup = Group.Administrators then user.UserGroup == Group.Administrators is true, because 8 == 8 is true (3) If you did the following user.UserGroup = Group.Supervisors then user.UserGroup < Group.Administrators is true, because 2 < 8 is true. All tested in VS.
November 2, 2017, 05:49 AM
It's Yes, Yes, Yes. The third one is user.UserGroup <= Group.Administrators
November 2, 2017, 12:45 AM
No, Yes, Yes .. tested and verified.
October 24, 2017, 03:00 PM
yes
September 19, 2017, 01:03 AM
Answer : YES,YES,YES Explanation : 1. User Can belong to More than Group. -TRUE 2. If User belongs to administrator then comparing against the administrator will result to True. 3. If user belongs to only supervisor group and checking if supervisor < administrator will result to True
August 30, 2017, 03:50 PM
In my opinion.... No, Yes, Yes
August 29, 2017, 08:02 AM
Correct Answer: Yes, Yes, Yes lt; = less than
August 19, 2017, 06:28 PM
Yes, Yes, Yes :)
August 16, 2017, 08:33 PM
Correct answers is No - Yes - Yes
July 29, 2017, 02:47 PM
https://msdn.microsoft.com/en-us/library/system.flagsattribute(v=vs.110).aspx#Examples
July 28, 2017, 08:25 PM
When you add the FlagsAttribute to an enum you should think of it like a bit operator. This question is confusing because it normally would be 0, 1, 2, 4 as that is how a byte works, although I do not think it really matters...at any rate in regards to the question a value of 3 then would mean you belong to the Users (1) and the Supervisors (2) group. A value of 17 would mean you belong to all of the groups (8 + 4 + 2 + 1). The first part would be yes, the second part would be yes (2 == 2), the third part (assuming no syntax error) would also be true as 2 is less than 8
June 30, 2017, 08:52 AM
True, True, True (Tested in VS). 1) can have more groups (its how flags works) 2) yes 3) correct question is: "user.UserGroup < Group.Administrators". And it returns true because Supervisors is less than Administrator (look at values of flags).
June 20, 2017, 09:44 PM
Note : user.UserGroup == 2 when user.UserGroup == Group.Supervisors. Last has to be Yes. A user might be part of more than one group in this particuliar situation, but that's only because of the misleading flags of the enum... Nothing infers against new groups set to [System.FlagsAttribute()] public enum Group { Users = 1, Supervisors = 2, Devs = 3, //New one Managers = 4, Retailers = 5, //Another new one Administrators = 8 } But yes, AS STATED IN THE QUESTION and said in Visionapp.Development, a user CAN be part of more than one group, when the flags are bit-compatibles. -> (with the "in-the-question" enum) user.UserGroup = Group.Users | Group.Managers; //user.UserGroup = 5 if ((user.UserGroup & Group.Users) == Group.Users) { Console.WriteLine("UserGroup is part of Users"); } // "5 & 1" returns 1 (bitwise conversion) if ((user.UserGroup & Group.Managers) == Group.Managers) { Console.WriteLine("UserGroup is part of Managers"); } // "5 & 4" returns 4 (bitwise conversion) -> (with the "+Devs-and-Retailers" enum) user.UserGroup = Group.Retailers; //user.UserGroup = 5 (== same as above [!! Woups !!]) if ((user.UserGroup & Group.Users) == Group.Users) { Console.WriteLine("UserGroup is part of Users"); } // "5 & 1" returns 1 [!! Woups !!] if ((user.UserGroup & Group.Managers) == Group.Managers) { Console.WriteLine("UserGroup is part of Managers"); } // "5 & 4" returns 4 [!! Woups !!]
June 20, 2017, 09:27 PM
"user.UserGroup < Group.Administrators" for the last part of the question.
May 11, 2017, 04:29 AM
This is confused by the comments below..please make it clear
May 3, 2017, 10:35 AM
A user can be member of more than one of groups should be true as enum has flags attribute set.
April 25, 2017, 10:44 AM
Correct answers are: Yes, Yes, Yes User user = new User(); user.UserGroup = Group.Users | Group.Admins; user.UserGroup = Group.Admins; if(user.UserGroup == Group.Admins) { Console.WriteLine("True"); } user.UserGroup = Group.Supervisiors; if(user.UserGroup <Group.Admins) { Console.WriteLine("True"); }

Question #21 - Topic 1

You are developing an application. The application includes a method named ReadFile that
reads data from a file.
The ReadFile() method must meet the following requirements:
✑ It must not make changes to the data file.
✑ It must allow other processes to access the data file.
✑ It must not throw an exception if the application attempts to open a data file that
does not exist.
You need to implement the ReadFile() method.
Which code segment should you use?

A. var fs = File.Open(Filename, FileMode.OpenOrCreate, FileAccess.Read, FileShare.ReadWrite);
B. var fs = File.Open(Filename, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
C. var fs = File.Open(Filename, FileMode.OpenOrCreate, FileAccess.Read, FileShare.Write);
D. var fs = File.ReadAllLines(Filename);
E. var fs = File.ReadAllBytes(Filename);

Comments for Question #21 - Topic 1 (2)

June 18, 2018, 02:16 PM
I think B is correct because of condition " It must not throw an exception if the application attempts to open a data file that does not exist."
June 3, 2018, 10:26 PM
The question is a bit confusing. It specifies "It must not make changes to the data file". But if we use "FileMode.Open" and the file does not exist, it generates an Exception. If we use "FileMode.OpenOrCreate" to avoid the Excepton, we are creating the file when it does not exist. That is not making changes?

Question #22 - Topic 1

You are adding a public method named UpdateGrade to a public class named ReportCard.
The code region that updates the grade field must meet the following requirements:
✑ It must be accessed by only one thread at a time.
✑ It must not be vulnerable to a deadlock situation.
You need to implement the UpdateGrade() method.
What should you do?

A. Option A
B. Option B
C. Option C
D. Option D

Comments for Question #22 - Topic 1 (2)

July 28, 2018, 03:40 AM
If A, lockObject need to be static - A & B won't avoid other threads that use other instances. A & C get mixed.
March 15, 2018, 08:55 AM
Isn't this question exactly the same as Question No : 16 ?

Question #23 - Topic 1

You are developing an application that will transmit large amounts of data between a client
computer and a server. You need to ensure the validity of the data by using a cryptographic
hashing algorithm. Which algorithm should you use?

A. ECDsa
B. RNGCryptoServiceProvider
C. Rfc2898DeriveBytes
D. HMACSHA512

Question #24 - Topic 1

You are developing an application. The application includes classes named Employee and
Person and an interface named IPerson.
The Employee class must meet the following requirements:
✑ It must either inherit from the Person class or implement the IPerson interface.
✑ It must be inheritable by other classes in the application.
You need to ensure that the Employee class meets the requirements.
Which two code segments can you use to achieve this goal? (Each correct answer
presents a complete solution. Choose two.)

A. Option A
B. Option B
C. Option C
D. Option D

Comments for Question #24 - Topic 1 (3)

April 23, 2018, 12:48 AM
I'll just add this for a bit of levity applying to *all* these questions. Once the requirements are given, they don't really need to add an instruction like "You need to ensure that the Employee class meets the requirements." That's pretty much understood!
November 17, 2017, 03:07 PM
Requirement: "✑ It must be inheritable by other classes in the application." => It must be abstract, because sealed does not provide this.
November 2, 2017, 07:25 PM
So we should use sealed, so why the answer is abstract ? Should'nt it be A,C ?

Question #25 - Topic 1

You are creating an application that manages information about your company's products.
The application includes a class named Product and a method named Save.
The Save() method must be strongly typed. It must allow only types inherited from the
Product class that use a constructor that accepts no parameters.
You need to implement the Save() method.
Which code segment should you use?

A. Option A
B. Option B
C. Option C
D. Option D

Question #26 - Topic 1

You are developing an application that includes the following code segment. (Line numbers
are included for reference only.)

The GetAnimals() method must meet the following requirements:
✑ Connect to a Microsoft SQL Server database.
✑ Create Animal objects and populate them with data from the database.
✑ Return a sequence of populated Animal objects.
You need to meet the requirements.
Which two actions should you perform? (Each correct answer presents part of the solution.
Choose two.)

A. Insert the following code segment at line 16: while(sqlDataReader.NextResult())
B. Insert the following code segment at line 13: sqlConnection.Open();
C. Insert the following code segment at line 13: sqlConnection.BeginTransaction();
D. Insert the following code segment at line 16: while(sqlDataReader.Read())
E. Insert the following code segment at line 16: while(sqlDataReader.GetValues())

Comments for Question #26 - Topic 1 (1)

October 14, 2017, 07:54 AM
Return customers? :)

Question #27 - Topic 1

You are testing an application. The application includes methods named CalculateInterest
and LogLine. The CalculateInterest() method calculates loan interest. The LogLine()
method sends diagnostic messages to a console window.
The following code implements the methods. (Line numbers are included for reference
only.)

You have the following requirements:
✑ The Calculatelnterest() method must run for all build configurations.
✑ The LogLine() method must run only for debug builds.
You need to ensure that the methods run correctly.
What are two possible ways to achieve this goal? (Each correct answer presents a
complete solution. Choose two.)

A. Insert the following code segment at line 01: #region DEBUG Insert the following code segment at line 10: #endregion
B. Insert the following code segment at line 10: [Conditional(MDEBUG")]
C. Insert the following code segment at line 05: #region DEBUG Insert the following code segment at line 07: #endregion
D. Insert the following code segment at line 01: #if DE30G Insert the following code segment at line 10: #endif
E. Insert the following code segment at line 01: [Conditional(MDEBUG")]
F. Insert the following code segment at line 05: #if DEBUG Insert the following code segment at line 07: #endif
G. Insert the following code segment at line 10: [Conditional("RELEASE")]

Comments for Question #27 - Topic 1 (3)

July 30, 2018, 05:41 PM
Is Correct only F.
March 12, 2018, 11:40 PM
[Conditional("DEBUG")]
October 13, 2017, 02:59 PM
(MDEBUG") => ("DEBUG")

Question #28 - Topic 1

An application receives JSON data in the following format:

The application includes the following code segment. (Line numbers are included for
reference only.)

You need to ensure that the ConvertToName() method returns the JSON input string as a
Name object.
Which code segment should you insert at line 10?

A. Return ser.Desenalize (json, typeof(Name));
B. Return ser.ConvertToType&lt;Name>(json);
C. Return ser.Deserialize&lt;Name>(json);
D. Return ser.ConvertToType (json, typeof (Name));

Comments for Question #28 - Topic 1 (4)

July 11, 2018, 01:38 AM
Uhhh... Exam-labs, is anyone quality assurance checking these answer options?? This is question 28 and I have seen at least 5 questions so far with wonky typo/bad html answer choices. Hmmmm....
October 10, 2017, 10:40 PM
C is correct, Tested in VS ser.Deserialize<Name>(json);
June 27, 2017, 01:27 PM
answer A probubly should to be Deserialize() instead Desenalize(), and it will be correct too)
May 3, 2017, 09:08 PM
answer C states Return ser.Deserialize&lt;Name>(json); should be Return ser.Deserialize<Name>(json);

Question #29 - Topic 1

You are developing an application that will populate an extensive XML tree from a
Microsoft SQL Server 2008 R2 database table named Contacts.
You are creating the XML tree. The solution must meet the following requirements:
✑ Minimize memory requirements.
✑ Maximize data processing speed.
You open the database connection. You need to create the XML tree.
How should you complete the relevant code? (To answer, drag the appropriate code
segments to the correct locations in the answer area. Each code segment may be used
once, more than once, or not at all. You may need to drag the split bar between panes or
scroll to view content.)

Comments for Question #29 - Topic 1 (4)

February 6, 2019, 03:49 AM
Correct Ans. is XElement contadcts = new XElement("contacts", Here is proof: https://dotnetfiddle.net/pVhS8C
August 1, 2018, 09:14 AM
Why XAttribute? “contacts” represents an element...
October 23, 2017, 07:20 AM
s
September 13, 2017, 07:22 PM
XElement contacts= new XElement("contacts,... only gives valid xml

Question #30 - Topic 1

You are implementing a method named Calculate that performs conversions between
value types and reference types. The following code segment implements the method.
(Line numbers are included for reference only.)

You need to ensure that the application does not throw exceptions on invalid conversions.
Which code segment should you insert at line 04?

A. int balance = (int) (float)amountRef;
B. int balance = (int)amountRef;
C. int balance = amountRef;
D. int balance = (int) (double) amountRef;

Comments for Question #30 - Topic 1 (5)

April 18, 2018, 03:48 PM
Correct is A. My compiler give Cast is redundant
April 18, 2018, 11:49 AM
Boxing and unboxing https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/types/boxing-and-unboxing
October 10, 2017, 10:53 PM
A is correct, tested in VS
August 30, 2017, 02:04 AM
they are just testing that you know you need to convert object back to float before you convert it to int, try these out and you'll see the other options all throw an error
August 6, 2017, 01:45 AM
What is the purpose of taking a float, boxing it up in an object, only to then cast it back to a float?

Question #31 - Topic 1

You are developing an application by using C#. The application includes the following code
segment. (Line numbers are included for reference only.)

The DoWork() method must not throw any exceptions when converting the obj object to the
IDataContainer interface or when accessing the Data property.
You need to meet the requirements. Which code segment should you insert at line 07?

A. var dataContainer = (IDataContainer)obj;
B. dynamic dataContainer = obj;
C. var dataContainer = obj is IDataContainer;
D. var dataContainer = obj as IDataContainer;

Comments for Question #31 - Topic 1 (4)

September 6, 2018, 08:00 AM
D
July 14, 2018, 08:29 PM
d
April 18, 2018, 11:54 AM
The direct cast i.e. (type)object will throw Invalid Cast Exception if the cast fails. However, "as" cast return nulls if the cast fails. "is" is used to check if the cast you are trying is possible.
June 26, 2017, 05:22 AM
What are the requirements?

Question #32 - Topic 1

You are developing a C# application that includes a class named Product. The following
code segment defines the Product class:

You implement System.ComponentModel.DataAnnotations.IValidateableObject interface to
provide a way to validate the Product object.
The Product object has the following requirements:
✑ The Id property must have a value greater than zero.
✑ The Name property must have a value other than empty or null.
You need to validate the Product object. Which code segment should you use?

A. Option A
B. Option B
C. Option C
D. Option D

Comments for Question #32 - Topic 1 (2)

April 18, 2018, 11:58 AM
IEnumerable<ValidationResult> Validate( ValidationContext validationContext )
March 8, 2018, 03:48 AM
Can anyone explain this?

Question #33 - Topic 1

You are developing a custom collection named LoanCollection for a class named Loan
class.
You need to ensure that you can process each Loan object in the LoanCollection collection
by using a foreach loop.
How should you complete the relevant code? (To answer, drag the appropriate code
segments to the correct locations in the answer area. Each code segment may be used
once, more than once, or not at all. You may need to drag the split bar between panes or
scroll to view content.)

Comments for Question #33 - Topic 1 (1)

May 12, 2017, 03:26 PM
So a requirement is to use a foreach loop but the solution doesn't offer one. Am I missing something?

Question #34 - Topic 1

You are developing a C# application that has a requirement to validate some string input
data by using the Regex class.
The application includes a method named ContainsHyperlink. The ContainsHyperlink()
method will verify the presence of a URI and surrounding markup.
The following code segment defines the ContainsHyperlink() method. (Line numbers are
included for reference only.)

The expression patterns used for each validation function are constant.
You need to ensure that the expression syntax is evaluated only once when the Regex
object is initially instantiated.
Which code segment should you insert at line 04?

A. Option A
B. Option B
C. Option C
D. Option D

Question #35 - Topic 1

You are developing an application by using C#.
The application includes an object that performs a long running process.
You need to ensure that the garbage collector does not release the object's resources until
the process completes.
Which garbage collector method should you use?

A. WaitForFullGCComplete()
B. SuppressFinalize()
C. WaitForFullGCApproach()
D. WaitForPendingFinalizers()

Comments for Question #35 - Topic 1 (2)

July 29, 2017, 09:41 PM
Se Question 95. KeepAlive() is the correct answer.
July 26, 2017, 12:35 PM
Correct answer: E: KeepAlive(). See https://msdn.microsoft.com/en-us/library/system.gc.keepalive(v=vs.110).aspx

Question #36 - Topic 1

You are developing an application by using C#. The application will output the text string
"First Line" followed by the text string "Second Line".
You need to ensure that an empty line separates the text strings.
Which four code segments should you use in sequence? (To answer, move the appropriate
code segments to the answer area and arrange them in the correct order.)

Comments for Question #36 - Topic 1 (4)

April 25, 2018, 03:16 PM
I can't see anything. No answer and no code suggestions. ?
September 14, 2017, 04:13 PM
The given ans is correct i executed in vs
June 11, 2017, 08:11 AM
am i wrong that "firstLine" should be after "secondLine"? second and fourth lines should be swaped
May 3, 2017, 12:07 PM
This answer will not leave an empty line between the 2 texts. Needs another sb.AppendLine() after the existing one.

Question #37 - Topic 1

You are creating a console application named App1.
App1 retrieves data from the Internet by using JavaScript Object Notation (JSON).
You are developing the following code segment (line numbers are included for reference
only):

You need to ensure that the code validates the JSON string.
Which code should you insert at line 03?

A. DataContractSerializer serializer = new DataContractSerializer();
B. var serializer = new DataContractSerializer();
C. XmlSerlalizer serializer = new XmlSerlalizer();
D. var serializer = new JavaScriptSerializer();

Question #38 - Topic 1

You are developing an application by using C#. The application includes the following code
segment. (Line numbers are included for reference only.)

The DoWork() method must throw an InvalidCastException exception if the obj object is not
of type IDataContainer when accessing the Data property.
You need to meet the requirements. Which code segment should you insert at line 07?

A. var dataContainer = (IDataContainer) obj;
B. var dataContainer = obj as IDataContainer;
C. var dataContainer = obj is IDataContainer;
D. dynamic dataContainer = obj;

Comments for Question #38 - Topic 1 (15)

August 13, 2018, 01:11 PM
B. var dataContainer = obj as IDataContainer;
August 13, 2018, 01:10 PM
B
August 12, 2018, 09:35 AM
A
March 5, 2018, 08:14 PM
Read carefully...it looks like a dupe another question...but it's a trick. This one says it "MUST THROW" the exception... null check that follows is useless code.
October 23, 2017, 07:05 AM
b
October 23, 2017, 07:05 AM
4
August 17, 2017, 06:30 PM
I think the correct answer is D, A throws exception when when you cast the object, B doesn't throw an exception, C is not a cast, D throws an exception, when you're accessing the Data property, as stated "if the obj object is not of type IDataContainer when accessing the Data property."
July 6, 2017, 05:51 PM
The exception is thrown when it does the casting, not "when accessing the Data property".
June 28, 2017, 02:19 PM
"The DoWork() method MUST THROW an InvalidCastException exception if the obj object is not of type IDataContainer" So its A
May 18, 2017, 02:50 PM
I volted A, @alexturcu901 are right
May 17, 2017, 12:57 PM
Correct answer is B. Is the same question 31.
May 17, 2017, 09:20 AM
A is correct since we have to throw the Exception! Choosing B would only return null but the exception would not be thrown
May 13, 2017, 02:27 PM
yes B is correct
April 25, 2017, 07:59 PM
No. A is correct. In this question, it is desired to throw an Exception.
April 25, 2017, 02:04 PM
I think B is the correct answer. See Question No. 31

Question #39 - Topic 1

You are developing an application. The application calls a method that returns an array of
integers named customerIds. You define an integer variable named customerIdToRemove
and assign a value to it. You declare an array named filteredCustomerIds.
You have the following requirements.
✑ Remove duplicate integers from the customerIds array.
✑ Sort the array in order from the highest value to the lowest value.
✑ Remove the integer value stored in the customerIdToRemove variable from the
customerIds array.
You need to create a LINQ query to meet the requirements.
Which code segment should you use?

A. Option A
B. Option B
C. Option C
D. Option D

Question #40 - Topic 1

You are creating an application that manages information about your company's products.
The application includes a class named Product and a method named Save.
The Save() method must be strongly typed. It must allow only types inherited from the
Product class that use a constructor that accepts no parameters.
You need to implement the Save() method. Which code segment should you use?

A. Option A
B. Option B
C. Option C
D. Option D

Comments for Question #40 - Topic 1 (1)

June 10, 2017, 05:22 PM
This is the third or fourth time this question appears....

Question #41 - Topic 1

You are developing an application by using C#. The application includes an array of
decimal values named loanAmounts. You are developing a LINQ query to return the values
from the array.
The query must return decimal values that are evenly divisible by two. The values must be
sorted from the lowest value to the highest value.
You need to ensure that the query correctly returns the decimal values.
How should you complete the relevant code? (To answer, drag the appropriate code
segments to the correct locations in the answer area. Each code segment may be used
once, more than once, or not at all. You may need to drag the split bar between panes or
scroll to view content.)

Comments for Question #41 - Topic 1 (1)

August 30, 2017, 02:33 AM
ascending is not required here for the outcome to be in the expected order

Question #42 - Topic 1

You are creating a class named Game.
The Game class must meet the following requirements:
✑ Include a member that represents the score for a Game instance.
✑ Allow external code to assign a value to the score member.
✑ Restrict the range of values that can be assigned to the score member.
You need to implement the score member to meet the requirements.
In which form should you implement the score member?

A. protected field
B. public static field
C. public static property
D. public property

Comments for Question #42 - Topic 1 (1)

November 17, 2017, 05:57 PM
"✑ Restrict the range of values that can be assigned to the score member." --> I got confused from it and I said C , because it has "static", but I am not sure. I agree with D, though.I just thought that there should be something more after public?

Question #43 - Topic 1

You use the Task.Run() method to launch a long-running data processing operation. The
data processing operation often fails in times of heavy network congestion.
If the data processing operation fails, a second operation must clean up any results of the
first operation.
You need to ensure that the second operation is invoked only if the data processing
operation throws an unhandled exception.
What should you do?

A. Create a task within the operation, and set the Task.StartOnError property to true.
B. Create a TaskFactory object and call the ContinueWhenAll() method of the object.
C. Create a task by calling the Task.ContinueWith() method.
D. Use the TaskScheduler class to create a task and call the TryExecuteTask() method on the class.

Comments for Question #43 - Topic 1 (1)

June 5, 2017, 07:30 PM
I just don't see how this is correct. In essence, the explanation says that the second task will always run. Because the first will either complete, fault out, or be canceled. But the question directions state that the second task is only to run if the data processing operation throws an unhandled exception. The word "only" should not be in the question as the answer shows that it's not what was intended.

Question #44 - Topic 1

You are developing a method named CreateCounters that will create performance counters
for an application. The method includes the following code. (Line numbers are included for
reference only.)

You need to ensure that Counter2 is available for use in Windows Performance Monitor
(PerfMon).
Which code segment should you insert at line 16?

A. CounterType = PerformanceCounterType.RawBase
B. CounterType = PerformanceCounterType.AverageBase
C. CounterType = PerformanceCounterType.SampleBase
D. CounterType = PerformanceCounterType.CounterMultiBase

Comments for Question #44 - Topic 1 (13)

August 7, 2018, 12:28 PM
D
July 23, 2018, 08:12 PM
so, whats is the correct answer ? B or D?
July 8, 2018, 05:47 PM
a
July 8, 2018, 05:47 PM
a
April 5, 2018, 05:43 PM
Base counter type Performance counter types AverageBase AverageTimer32 or AverageCount64 CounterMultiBase CounterMultiTimer or CounterMultiTimerInverse or CounterMultiTimer100Ns or CounterMultiTimer100NsInverse RawBase RawFraction SampleBase SampleFraction
April 5, 2018, 05:41 PM
Should the answer to this be PerformanceCounterType.AverageBase?
March 28, 2018, 02:59 PM
Right answer is B. See https://msdn.microsoft.com/en-us/library/system.diagnostics.performancecountertype(v=vs.110).aspx
November 18, 2017, 11:57 AM
D. CounterType = PerformanceCounterType.CounterMultiBase
October 9, 2017, 08:19 AM
d
June 24, 2017, 10:21 PM
AverageTimer32 >> PerformanceCounterType.AverageBase, AverageCount64 >> PerformanceCounterType.AverageBase SampleFraction >> PerformanceCounterType.SampleBase RawFraction >> PerformanceCounterType.RawBase
May 17, 2017, 01:47 PM
Actually B is the right answer, AverageBase A base counter that is used in the calculation of time or count averages, such as AverageTimer32 and AverageCount64. Stores the denominator for calculating a counter to present “time per operation” or “count per operation”. and about c u cant use SampleBase width AverageTimer32 , to use SampleBase u need SampleFraction RawBase RawFraction https://msdn.microsoft.com/en-us/library/system.diagnostics.performancecountertype(v=vs.110).aspx
May 12, 2017, 05:29 PM
This answer is wrong. It's B. You need the average base for comparison. And the explanation doesn't say a thing about D (Counter Multi Base). This is all kinds of messed up...
April 27, 2017, 01:24 PM
Wrong answer I think, those are something called composite counters. As the name suggests, these counters are composited of two counters – a parent counter and a base counter. Parent counters can be monitored, base counters cannot. More info at https://manski.net/2013/11/windows-performance-counter-types/

Question #45 - Topic 1

You are developing an application that includes a class named BookTracker for tracking
library books. The application includes the following code segment. (Line numbers are
included for reference only.)

You need to add a user to the BookTracker instance. What should you do?

A. Option A
B. Option B
C. Option C
D. Option D

Comments for Question #45 - Topic 1 (2)

March 24, 2018, 10:22 AM
Is this answer correct?
March 13, 2018, 01:11 PM
... you need to add a book ... not a user

Question #46 - Topic 1

You have the following code:

To answer, complete each statement according to the information presented in the code.

Question #47 - Topic 1

You are implementing a library method that accepts a character parameter and returns a
string.
If the lookup succeeds, the method must return the corresponding string value. If the
lookup fails, the method must return the value "invalid choice."
You need to implement the lookup algorithm.
How should you complete the relevant code? (To answer, select the correct keyword in
each drop-down list in the answer area.)


Question #48 - Topic 1

An application receives JSON data in the following format:

The application includes the following code segment. (Line numbers are included for
reference only.)

You need to ensure that the ConvertToName() method returns the JSON input string as a
Name object.
Which code segment should you insert at line 10?

A. Return ser.ConvertToType&lt;Name>(json);
B. Return ser.DeserializeObject(json);
C. Return ser.Deserialize&lt;Name>(json);
D. Return (Name)ser.Serialize(json);

Comments for Question #48 - Topic 1 (1)

July 3, 2017, 09:38 AM
Duplicated question...

Question #49 - Topic 1

An application includes a class named Person. The Person class includes a method named
GetData.
You need to ensure that the GetData() method can be used only by the Person class and
not by any class derived from the Person class.
Which access modifier should you use for the GetData() method?

A. Public
B. Protected internal
C. Internal
D. Private
E. Protected

Question #50 - Topic 1

You are modifying an application that processes leases. The following code defines the
Lease class. (Line numbers are included for reference only.)

Leases are restricted to a maximum term of 5 years. The application must send a
notification message if a lease request exceeds 5 years.
You need to implement the notification mechanism.
Which two actions should you perform? (Each correct answer presents part of the solution.
Choose two.)

A. Option A
B. Option B
C. Option C
D. Option D
E. Option E
F. Option F

Comments for Question #50 - Topic 1 (3)

May 21, 2018, 07:51 PM
One could use EventArgs.Empty rather than "new EventArgs()"
July 3, 2017, 06:14 AM
The problem is that no one answer validates the condition of 5 years
June 29, 2017, 03:09 PM
Is this the correct answer? Since Option B will not notify if the number of years is >5

Question #51 - Topic 1

You are developing an application that includes a class named Warehouse. The
Warehouse class includes a static property named Inventory- The Warehouse class is
defined by the following code segment. (Line numbers are included for reference only.)

You have the following requirements:
✑ Initialize the _inventory field to an Inventory instance.
✑ Initialize the _inventory field only once.
✑ Ensure that the application code acquires a lock only when the _inventory object
must be instantiated.
You need to meet the requirements.
Which three code segments should you insert in sequence at line 09? (To answer, move
the appropriate code segments from the list of code segments to the answer area and
arrange them in the correct order.)

Comments for Question #51 - Topic 1 (2)

May 14, 2018, 06:56 PM
It kinda feels you don't really needs that last if statement, since you already checked if the inventory is null before using the lock.
April 21, 2018, 09:02 PM
Possible is partially wrong? Third part must be if is not null?

Question #52 - Topic 1

You are developing an application that will transmit large amounts of data between a client
computer and a server.
You need to ensure the validity of the data by using a cryptographic hashing algorithm.
Which algorithm should you use?

A. HMACSHA256
B. RNGCryptoServiceProvider
C. DES
D. Aes

Question #53 - Topic 1

You are developing an application that will convert data into multiple output formats.
The application includes the following code. (Line numbers are included for reference only.)

You are developing a code segment that will produce tab-delimited output. All output
routines implement the following interface:

You need to minimize the completion time of the GetOutput() method.
Which code segment should you insert at line 06?

A. Option A
B. Option B
C. Option C
D. Option D

Question #54 - Topic 1

You are developing an application. The application includes classes named Mammal and
Animal and an interface named IAnimal.
The Mammal class must meet the following requirements:
✑ It must either inherit from the Animal class or implement the IAnimal interface.
✑ It must be inheritable by other classes in the application.
You need to ensure that the Mammal class meets the requirements.
Which two code segments can you use to achieve this goal? (Each correct answer
presents a complete solution. Choose two.)

A. Option A
B. Option B
C. Option C
D. Option D

Question #55 - Topic 1

You are developing an assembly that will be used by multiple applications.
You need to install the assembly in the Global Assembly Cache (GAC).
Which two actions can you perform to achieve this goal? (Each correct answer presents a
complete solution. Choose two.)

A. Use the Assembly Registration tool (regasm.exe) to register the assembly and to copy the assembly to the GAC.
B. Use the Strong Name tool (sn.exe) to copy the assembly into the GAC.
C. Use Microsoft Register Server (regsvr32.exe) to add the assembly to the GAC.
D. Use the Global Assembly Cache tool (gacutil.exe) to add the assembly to the GAC.
E. Use Windows Installer 2.0 to add the assembly to the GAC.

Comments for Question #55 - Topic 1 (6)

November 18, 2019, 05:29 PM
Wrong answer is given. Answer is B and D
July 24, 2018, 01:03 PM
B and D
March 31, 2018, 11:02 AM
It's wrong. When you want to install an assembly to GAC first your assembly has to have a strong name. So you have to use the strong name tool sn.exe, and than to install it you use the gacutil.exe. no need for windows installer.. so correct is B,D
March 6, 2018, 09:24 AM
The description of B. is wrong: sn.exe creates a strong name for the assembly, which is a prerequisite for installing it into the GAC. But it does not install the assembly into the GAC. This is a trap: One would think that sn.exe plus gacutil.exe is correct, but since the description is wrong, the solution must be D and E as alternatives.
June 11, 2017, 10:10 AM
to avoid mimsundarstanding this link will help to answer -> https://msdn.microsoft.com/en-us/library/dkkx7f79(v=vs.85).aspx
April 23, 2017, 10:27 AM
Is the answer correct? Either you can use B and D for development or you can use E for released Assemblies

Question #56 - Topic 1

You are developing a class named ExtensionMethods.
You need to ensure that the ExtensionMethods class implements the IsEmail() extension
method on string objects.
How should you complete the relevant code? (To answer, drag the appropriate code
segments to the correct locations in the answer area. Each code segment may be used
once, more than once, or not at all. You may need to drag the split bar between panes or
scroll to view content.)

Comments for Question #56 - Topic 1 (1)

July 7, 2018, 03:20 AM
Ignore the box around the last item (protected static class ExtensionMethods)

Question #57 - Topic 1

You are implementing a method that creates an instance of a class named User. The User
class contains a public event named Renamed. The following code segment defines the
Renamed event:
Public event EventHandler&lt;RenameEventArgs> Renamed;
You need to create an event handler for the Renamed event by using a lambda expression.
How should you complete the relevant code? (To answer, drag the appropriate code
segments to the correct locations in the answer area. Each code segment may be used
once, more than once, or not at all. You may need to drag the split bar between panes or
scroll to view content.)

Question #58 - Topic 1

You are developing an application. The application converts a Location object to a string by
using a method named WriteObject. The WriteObject() method accepts two parameters, a
Location object and an XmlObjectSerializer object.
The application includes the following code. (Line numbers are included for reference only.)

You need to serialize the Location object as a JSON object.
Which code segment should you insert at line 20?

A. New DataContractSerializer(typeof(Location))
B. New XmlSerializer(typeof(Location))
C. New NetDataContractSenalizer()
D. New DataContractJsonSerializer(typeof(Location))

Comments for Question #58 - Topic 1 (6)

October 15, 2017, 04:24 PM
D
July 23, 2017, 01:41 PM
"You need to serialize the Location object as a JSON object". D is the correct answer
July 16, 2017, 03:26 PM
DataContractJsonSerializer extends XMLObjectSerializer which makes it a valid parameter for the WriteObject method
July 10, 2017, 03:48 AM
The answer is A
July 6, 2017, 01:37 PM
This answer can't be right - there is no mention of JSON and the WriteObject method expects an XmlObjectSerializer. I would go with A.
July 3, 2017, 07:47 PM
Uhm wasn't it suppose to use XmlObjectSerializer?

Question #59 - Topic 1

You are developing an application by using C#. You provide a public key to the
development team during development.
You need to specify that the assembly is not fully signed when it is built.
Which two assembly attributes should you include in the source code? (Each correct
answer presents part of the solution. Choose two.)

A. AssemblyFlagsAttribute
B. AssemblyKeyFileAttribute
C. AssemblyConfigurationAttribute
D. AssemblyDelaySignAttribute

Comments for Question #59 - Topic 1 (6)

April 2, 2018, 08:46 PM
B,D
April 2, 2018, 08:46 PM
A
April 2, 2018, 08:46 PM
A
April 2, 2018, 08:46 PM
a
April 2, 2018, 08:46 PM
a
June 22, 2017, 08:22 AM
The two answers that were NOT correct: 1. AssemblyFlagsAttribute - The AssemblyNameFlags enumeration describes the assembly characteristics that can be set using this attribute. 2. AssemblyDelaySignAttribute - Specifies that the assembly is not fully signed when created.

Question #60 - Topic 1

You are developing an application that will transmit large amounts of data between a client
computer and a server. You need to ensure the validity of the data by using a cryptographic
hashing algorithm. Which algorithm should you use?

A. RSA
B. HMACSHA2S6
C. Aes
D. RNGCryptoServiceProvider

Comments for Question #60 - Topic 1 (1)

July 3, 2017, 09:56 AM
Duplicated question

Question #61 - Topic 1

You are developing a class named ExtensionMethods.
You need to ensure that the ExtensionMethods class implements the IsEmail() method on
string objects.
How should you complete the relevant code? (To answer, drag the appropriate code
segments to the correct locations in the answer area. Each code segment may be used
once, more than once, or not at all. You may need to drag the split bar between panes or
scroll to view content.)

Comments for Question #61 - Topic 1 (3)

July 3, 2017, 09:56 AM
duplicated question
June 10, 2017, 05:49 PM
Duplicated question
May 12, 2017, 07:09 PM
The question has "IsEmail()" but the example shows "IsUrl()". Come on guys, fix this... It only is causing confusion...

Question #62 - Topic 1

You are developing an application that uses several objects. The application includes the
following code segment. (Line numbers are included for reference only.)

You need to evaluate whether an object is null.
Which code segment should you insert at line 03?

A. Option A
B. Option B
C. Option C
D. Option D

Question #63 - Topic 1

You are developing an application that includes a class named BookTracker for tracking
library books. The application includes the following code segment. (Line numbers are
included for reference only.)

You need to add a book to the BookTracker instance.
What should you do?

A. Option A
B. Option B
C. Option C
D. Option D

Comments for Question #63 - Topic 1 (3)

July 7, 2018, 03:44 AM
I keep coming up with D as my answer, am I wrong?
June 20, 2018, 08:38 PM
a
June 19, 2018, 02:06 AM
Can anyone explain the answer?

Question #64 - Topic 1

You use the Task.Run() method to launch a long-running data processing operation. The
data processing operation often fails in times of heavy network congestion.
If the data processing operation fails, a second operation must clean up any results of the
first operation.
You need to ensure that the second operation is invoked only if the data processing
operation throws an unhandled exception.
What should you do?

A. Create a TaskCompletionSource&lt;T> object and call the TrySetException() method of the object.
B. Create a task by calling the Task.ContinueWith() method.
C. Examine the Task.Status property immediately after the call to the Task.Run() method.
D. Create a task inside the existing Task.Run() method by using the AttachedToParent option.

Comments for Question #64 - Topic 1 (2)

July 31, 2017, 09:29 AM
B is close, but you need to call it with a second argument TaskContinuationOptions.OnlyOnFaulted.
July 3, 2017, 09:59 AM
duplicated question

Question #65 - Topic 1

You are developing an application that includes a class named UserTracker. The
application includes the following code segment. (Line numbers are included for reference
only.)

You need to add a user to the UserTracker instance.
What should you do?

A. Option A
B. Option B
C. Option C
D. Option D

Comments for Question #65 - Topic 1 (2)

July 7, 2017, 11:56 AM
Isn't this question a duplicate of Question #63 with the answers switched around..?
June 10, 2017, 05:53 PM
OMG, the very same question on same page, only differing by class name...

Question #66 - Topic 1

You are developing an application. The application calls a method that returns an array of
integers named employeeIds. You define an integer variable named employeeIdToRemove
and assign a value to it. You declare an array named filteredEmployeeIds.
You have the following requirements:
✑ Remove duplicate integers from the employeeIds array.
✑ Sort the array in order from the highest value to the lowest value.
✑ Remove the integer value stored in the employeeIdToRemove variable from the
employeeIds array.
You need to create a LINQ query to meet the requirements.
Which code segment should you use?

A. Option A
B. Option B
C. Option C
D. Option D

Question #67 - Topic 1

You are developing an application that includes a class named Kiosk. The Kiosk class
includes a static property named Catalog. The Kiosk class is defined by the following code
segment. (Line numbers are included for reference only.)

You have the following requirements:
✑ Initialize the _catalog field to a Catalog instance.
✑ Initialize the _catalog field only once.
✑ Ensure that the application code acquires a lock only when the _catalog object
must be instantiated.
You need to meet the requirements.
Which three code segments should you insert in sequence at line 09? (To answer, move
the appropriate code segments from the list of code segments to the answer area and
arrange them in the correct order.)

Question #68 - Topic 1

You are creating a class named Data that includes a dictionary object named _data.
You need to allow the garbage collection process to collect the references of the _data
object.
How should you complete the relevant code? (To answer, drag the appropriate code
segments to the correct locations in the answer area. Each code segment may be used
once, more than once, or not at all. You may need to drag the split bar between panes or
scroll to view content.)

Comments for Question #68 - Topic 1 (2)

March 20, 2018, 08:35 AM
But a WeakReference is much bigger than an Int32... why would you do this?
August 30, 2017, 03:12 AM
this would crash because _data is not instantiated

Question #69 - Topic 1

You have a method named GetCustomerIDs that returns a list of integers. Each entry in the
list represents a customer ID that is retrieved from a list named Customers. The Customers
list contains 1,000 rows.
Another developer creates a method named ValidateCustomer that accepts an integer
parameter and returns a Boolean value. ValidateCustomer returns true if the integer
provided references a valid customer. ValidateCustomer can take up to one second to run.
You need to create a method that returns a list of valid customer IDs. The code must
execute in the shortest amount of time.
What should you do? (Develop the solution by selecting and ordering the required code
snippets. You may not need all of the code snippets.)

Comments for Question #69 - Topic 1 (11)

February 7, 2019, 04:12 AM
Correct Ans. is 1, 8, 7, 4 Here is proof: https://dotnetfiddle.net/XFS9Uw
August 4, 2018, 05:03 PM
"You need to create a method" So, we should at least use public List<Int32> GetValidCustomers .. I agree with Abc123456789
October 5, 2017, 03:11 PM
1 8 7 4 is Currect
September 14, 2017, 05:05 PM
1 8 7 4 is the ans
July 23, 2017, 01:52 PM
https://msdn.microsoft.com/fr-fr/library/dd460714(v=vs.110).aspx
July 4, 2017, 04:56 AM
I am not agree, with all user answers, the correct one is the same there, because if you try AsParalell when the list is declared, the compiler won't take the filter into runtime, the best is process multithread method after the Linq query is declared (on my opinion)
May 14, 2017, 05:21 PM
Who actually comes up with these wrong answers?
April 27, 2017, 01:39 PM
public List<int> GetValidCustomers() { List<int> validCustomers = (from c in customers.AsParallel() where ValidateCustomer(c) select c).ToList(); return validCustomers; }
April 27, 2017, 01:34 PM
I also agree, but aside of that please read the following: You need to create a method that returns a list of valid customer IDs the whole method needs to be constructed.
April 25, 2017, 09:07 PM
I agree with Pbush25
April 25, 2017, 08:01 PM
it should be c in customers.AsParallel() where ValidateCustomer(c) select c).ToList();

Question #70 - Topic 1

You are developing an application by using C#. You provide a public key to the
development team during development.
You need to specify that the assembly is not fully signed when it is built.
Which two assembly attributes should you include in the source code? (Each correct
answer presents part of the solution. Choose two.)

A. AssemblyKeyNameAttribute
B. ObfuscateAssemblyAttribute
C. AssemblyDelaySignAttribute
D. AssemblyKeyFileAttribute

Comments for Question #70 - Topic 1 (1)

March 6, 2018, 09:53 AM
For an overview of assembly attributes look at: https://docs.microsoft.com/en-us/dotnet/framework/app-domains/set-assembly-attributes

Question #71 - Topic 1

You are developing an application that implements a set of custom exception types. You
declare the custom exception types by using the following code segments:

The application includes a function named DoWork that throws .NET Framework
exceptions and custom exceptions.
The application contains only the following logging methods:

The application must meet the following requirements:
✑ When AdventureWorksValidationException exceptions are caught, log the
information by using the static void Log (AdventureWorksValidationException ex)
method.
✑ When AdventureWorksDbException or other AdventureWorksException
exceptions are caught, log the information by using the static void I oq(
AdventureWorksException ex) method.
You need to meet the requirements.
How should you complete the relevant code? (To answer, drag the appropriate code
segments to the correct locations in the answer area. Each code segment may be used
once, more than once, or not at all. You may need to drag the split bar between panes or
scroll to view content.)

Comments for Question #71 - Topic 1 (3)

July 29, 2018, 11:07 AM
catching more specific exceptions first before catching more generic exceptions
May 14, 2018, 07:16 PM
Rule of thumb (and what they want you to understand): always start with the most detailed Exception and work your way back to more general exceptions in later catch blocks.
March 6, 2018, 09:58 AM
A third requirement is missing like: When any other Exception is thrown, log it by using the static void Iog( Exception ex) method.

Question #72 - Topic 1

You are developing an application by using C#. The application will process several objects
per second.
You need to create a performance counter to analyze the object processing.
Which three actions should you perform in sequence? (To answer, move the appropriate
actions from the list of actions to the answer area and arrange them in the correct order.)

Question #73 - Topic 1

An application will upload data by using HTML form-based encoding. The application uses
a method named SendMessage.
The SendMessage() method includes the following code. (Line numbers are included for
reference only.)

The receiving URL accepts parameters as form-encoded values.
You need to send the values intA and intB as form-encoded values named a and b,
respectively.
Which code segment should you insert at line 04?

A. Option A
B. Option B
C. Option C
D. Option D

Comments for Question #73 - Topic 1 (3)

August 30, 2018, 06:18 AM
D
April 10, 2018, 08:20 PM
C is correct UploadDataTaskAsync last parameter must be a byte array
July 17, 2017, 01:37 PM
A has the wrong signature. B will upload a file, and "data" obviously isn't a file name. But what's wrong about C?

Question #74 - Topic 1

You are debugging an application that calculates loan interest. The application includes the
following code. (Line numbers are included for reference only.)

You need to ensure that the debugger breaks execution within the CalculateInterest()
method when the loanAmount variable is less than or equal to zero in all builds of the
application.
What should you do?

A. Insert the following code segment at line 03: Trace.Assert(loanAmount > 0);
B. Insert the following code segment at line 03: Debug.Assert(loanAmount > 0);
C. Insert the following code segment at line 05: Debug.Write(loanAmount > 0);
D. Insert the following code segment at line 05: Trace.Write(loanAmount > 0);

Comments for Question #74 - Topic 1 (3)

October 19, 2017, 01:10 PM
shouldn't it be "Trace.Assert(loanAmount <= 0);"?
May 12, 2017, 07:31 AM
noup. Correct is A. Read carefuly: "in all!!!!! builds of the application". Not in debug builds.
May 10, 2017, 09:57 PM
correct answer is B. Debug Assert https://msdn.microsoft.com/en-us/library/system.diagnostics.debug.assert(v=vs.110).aspx

Question #75 - Topic 1

You are developing an application that uses structured exception handling. The application
includes a class named Logger. The Logger class implements a method named Log by
using the following code segment:
public static void Log(Exception ex) { }
You have the following requirements:
✑ Log all exceptions by using the Log() method of the Logger class.
✑ Rethrow the original exception, including the entire exception stack.
You need to meet the requirements. Which code segment should you use?

A. Option A
B. Option B
C. Option C
D. Option D

Question #76 - Topic 1

You are creating a console application by using C#.
You need to access the assembly found in the file named car.dll.
Which code segment should you use?

A. Assembly.Load();
B. Assembly.GetExecutingAssembly();
C. This.GetType();
D. Assembly.LoadFile("car.dll");

Question #77 - Topic 1

You are creating a class named Employee. The class exposes a string property named
EmployeeType. The following code segment defines the Employee class. (Line numbers
are included for reference only.)

The EmployeeType property value must meet the following requirements:
✑ The value must be accessed only by code within the Employee class or within a
class derived from the Employee class.
✑ The value must be modified only by code within the Employee class.
You need to ensure that the implementation of the EmployeeType property meets the
requirements.
Which two actions should you perform? (Each correct answer represents part of the
complete solution. Choose two.)

A. Replace line 03 with the following code segment: public string EmployeeType
B. Replace line 06 with the following code segment: protected set;
C. Replace line 05 with the following code segment: private get;
D. Replace line 05 with the following code segment: protected get;
E. Replace line 03 with the following code segment: protected string EmployeeType
F. Replace line 06 with the following code segment: private set;

Question #78 - Topic 1

You are developing an application. The application converts a Location object to a string by
using a method named WriteObject.
The WriteObject() method accepts two parameters, a Location object and an
XmlObjectSerializer object.
The application includes the following code. (Line numbers are included for reference only.)

You need to serialize the Location object as XML.
Which code segment should you insert at line 20?

A. new XmlSerializer(typeof(Location))
B. new NetDataContractSerializer()
C. new DataContractJsonSerializer(typeof (Location))
D. new DataContractSerializer(typeof(Location))

Comments for Question #78 - Topic 1 (2)

May 18, 2018, 06:43 PM
Why C isn't correct? it inherit from XmlObjectSerializer https://msdn.microsoft.com/en-us/library/system.runtime.serialization.json.datacontractjsonserializer(v=vs.110).aspx
March 15, 2018, 01:47 AM
Yep. I forgot about the attribute thing.

Question #79 - Topic 1

You are developing an application that uses the Microsoft ADO.NET Entity Framework to
retrieve order information from a Microsoft SQL Server database. The application includes
the following code. (Line numbers are included for reference only.)

The application must meet the following requirements:
✑ Return only orders that have an OrderDate value other than null.
✑ Return only orders that were placed in the year specified in the year parameter.
You need to ensure that the application meets the requirements. Which code segment
should you insert at line 08?

A. Option A
B. Option B
C. Option C
D. Option D

Question #80 - Topic 1

You are creating a console application by using C#.
You need to access the application assembly.
Which code segment should you use?

A. Assembly.GetAssembly(this);
B. this.GetType();
C. Assembly.Load();
D. Assembly.GetExecutingAssembly();

Question #81 - Topic 1

You are developing an application that uses the Microsoft ADO.NET Entity Framework to
retrieve order information from a Microsoft SQL Server database. The application includes
the following code. (Line numbers are included for reference only.)

The application must meet the following requirements:
✑ Return only orders that have an OrderDate value other than null.
✑ Return only orders that were placed in the year specified in the OrderDate property
or in a later year.
You need to ensure that the application meets the requirements.
Which code segment should you insert at line 08?

A. Where order.OrderDate.Value != null && order.OrderDate.Value.Year > = year
B. Where order.OrderDate.Value = = null && order.OrderDate.Value.Year = = year
C. Where order.OrderDate.HasValue && order.OrderDate.Value.Year = = year
D. Where order.OrderDate.Value.Year = = year

Comments for Question #81 - Topic 1 (4)

July 26, 2018, 07:25 PM
The correct answer is A .. year specified in the OrderDate property OR in a LATER year (Bigger than the specified year)
September 27, 2017, 07:37 PM
Answer is C... not a. A does return all the orders that are placed in the specified year AND after. The HasValue does the same as the "Where order.OrderDate.Value != null check" and can be used on a nullable type.
September 20, 2017, 11:15 AM
a
September 19, 2017, 07:32 PM
B. Year == year

Question #82 - Topic 1

You are developing an application that will include a method named GetData. The
GetData() method will retrieve several lines of data from a web service by using a
System.IO.StreamReader object.
You have the following requirements:
✑ The GetData() method must return a string value that contains the first line of the
response from the web service.
✑ The application must remain responsive while the GetData() method runs.
You need to implement the GetData() method.
How should you complete the relevant code? (To answer, drag the appropriate objects to
the correct locations in the answer area. Each object may be used once, more than once,
or not at all. You may need to drag the split bar between panes or scroll to view content.)

Comments for Question #82 - Topic 1 (1)

April 24, 2018, 01:51 PM
async void? Amazing....

Question #83 - Topic 1

You have the following class:

You need to implement IEquatable. The Equals method must return true if both ID and
Name are set to the identical values. Otherwise, the method must return false. Equals must
not throw an exception.
What should you do? (Develop the solution by selecting and ordering the required code
snippets. You may not need all of the code snippets.)

Comments for Question #83 - Topic 1 (6)

July 26, 2018, 07:48 PM
when you try to compare by this.Name.Equals, if the Name field will be null, you will receive an exception, while when you compare by Object.Equals(), doesn`t matter if is null or not, and the comparison will happen correctly
October 24, 2017, 12:34 AM
Object.Equals() compares references not string values so the first option is incorrect
August 17, 2017, 07:06 AM
Apart from the missing return true, exchanging the second and third line is also correct.
May 17, 2017, 08:32 PM
if (other == null)return false; if (this.ID != other.ID)return false; if (!Object.Equals(this.Name,other.Name))return false; return true; IS CORRECT ANSWER. TESTED!!!
April 27, 2017, 01:56 PM
not probably, most definitely, also this questions seems a bit iffy, what I mean by that is: if (!Object.Equals(this.Name, other.Name)) return false; if(!this.Name.Equals(other.Name)) return false; is the same thing
April 25, 2017, 09:46 PM
return true is probably missing at the end.

Question #84 - Topic 1

You are developing a method named CreateCounters that will create performance counters
for an application.
The method includes the following code. (Line numbers are included for reference only.)

You need to ensure that Counter1 is available for use in Windows Performance Monitor
(PerfMon).
Which code segment should you insert at line 16?

A. CounterType = PerformanccCounterType.RawBase
B. CounterType = PerformanceCounterType.AverageBase
C. CounterType = PerformanceCounterType.SampleBase
D. CounterType = PerformanceCounterType.CounterMultiBase

Comments for Question #84 - Topic 1 (4)

August 11, 2018, 06:06 PM
C
August 11, 2018, 06:05 PM
C
March 28, 2018, 07:32 PM
https://msdn.microsoft.com/en-us/library/system.diagnostics.performancecountertype.aspx#Remarks Check table in Remarks section
March 6, 2018, 10:33 AM
"SampleBase: A base counter that stores the number of sampling interrupts taken and is used as a denominator in the sampling fraction." So to make it clear to myself: A performance counter of type PerformanceCounterType.SampleFraction needs the presence of another counter of type PerformanceCounterType.SampleBase. Otherwise it will not work. http://msdn.microsoft.com/en-us/library/system.diagnostics.performancecountertype.aspx

Question #85 - Topic 1

You are developing an application that includes a Windows Communication Foundation
(WCF) service. The service includes a custom TraceSource object named ts and a method
named DoWork. The application must meet the following requirements:
✑ Collect trace information when the DoWork() method executes.
✑ Group all traces for a single execution of the DoWork() method as an activity that
can be viewed in the WCF Service Trace Viewer Tool.
You need to ensure that the application meets the requirements.
How should you complete the relevant code? (To answer, select the correct code segment
from each drop-down list in the answer area.)


Comments for Question #85 - Topic 1 (1)

March 6, 2018, 10:52 AM
See https://msdn.microsoft.com/en-us/library/system.diagnostics.tracesource.tracetransfer.aspx : "If a logical operation begins in one activity and transfers to another, the second activity logs the transfer by calling the TraceTransfer method. The TraceTransfer call relates the new activity identity to the previous identity. "

Question #86 - Topic 1

An application serializes and deserializes XML from streams. The XML streams are in the
following format:

The application reads the XML streams by using a DataContractSerializer object that is
declared by the following code segment:
var ser = new DataContractSerializer(typeof(Name));
You need to ensure that the application preserves the element ordering as provided in the
XML stream.
How should you complete the relevant code? (To answer, drag the appropriate attributes to
the correct locations in the answer area-Each attribute may be used once, more than once,
or not at all. You may need to drag the split bar between panes or scroll to view content.)

Comments for Question #86 - Topic 1 (2)

July 16, 2018, 09:58 AM
[DataContract (NameSpace =’http://www.contoso.com/2012/06′)] class Name { [DataMember (Order = 10)] —> FirstName is the last public string FirstName{get;set;} [DataMember] —> lastname is first public string LastName{get;set;} }
May 9, 2017, 03:13 PM
[DataMember (Order = 10)] =>[DataMember (Order = 0)]

Question #87 - Topic 1

You develop an application that displays information from log files when errors occur. The
application will prompt the user to create an error report that sends details about the error
and the session to the administrator.
When a user opens a log file by using the application, the application throws an exception
and closes.
The application must preserve the original stack trace information when an exception
occurs during this process.
You need to implement the method that reads the log files.
How should you complete the relevant code? (To answer, drag the appropriate code
segments to the correct locations in the answer area. Each code segment may be used
once, more than once, or not at all. You may need to drag the split bar between panes or
scroll to view content.)

Comments for Question #87 - Topic 1 (1)

June 29, 2017, 05:11 PM
Shouldn't the correct answer be StringReader instead of StreamReader??

Question #88 - Topic 1

You are creating a class named Employee. The class exposes a string property named
EmployeeType. The following code segment defines the Employee class. (Line numbers
are included for reference only.)

The EmployeeType property value must be accessed and modified only by code within the
Employee class or within a class derived from the Employee class.
You need to ensure that the implementation of the EmployeeType property meets the
requirements.
Which two actions should you perform? (Each correct answer represents part of the
complete solution. Choose two.)

A. Replace line 05 with the following code segment: protected get;
B. Replace line 06 with the following code segment: private set;
C. Replace line 03 with the following code segment: public string EmployeeType
D. Replace line 05 with the following code segment: private get;
E. Replace line 03 with the following code segment: protected string EmployeeType
F. Replace line 06 with the following code segment: protected set;

Comments for Question #88 - Topic 1 (7)

April 24, 2018, 02:23 PM
I would answer only E. Since it will be protected at the property level, why would you modify the setter as "private set" or "protected set"? The condition is "The EmployeeType property value must be accessed and modified only by code within the Employee class or within a class derived from the Employee class.", So making it as a protected property should be enough, no?
September 9, 2017, 07:14 PM
I Know That this question must be broken but if we deal with it as it is then the answer will indeed be B,E here is why : First of all keep in mind that you can't set modifiers for both accessors and that you can only set one of them at an accessibility modifier that is more restrictive than the accessibility of the property itself : Sooo .. C is totally out because we would need to put modifiers for both accessors , and because we can't set both accessors with modifiers then it is a must to put a modifier for the property itself and choose one more individual modifier to specifiy a modifier for it so we must take E as the first solution , leaving you with A,B,D,F as a second solution And because w chose E and the property is protected then A,F are out ... So the second solution can be private set not private get as it is extremely rare to see a private get ( THIS IS THE MOST NONSENSE PART OF THE QUESTION )
August 26, 2017, 05:22 PM
The question isn't correct - it is missing another piece which states that the EmployeeType property can only be modified by the class it is contained in - so this is why the set accessor has to be private (so B and E)
August 16, 2017, 09:16 PM
The answer is A,F
August 14, 2017, 09:27 AM
As already mentioned there is no correct answer if you have to pick two... A and F will not compile! Try it for yourselves! The only correct option would be E, but it is impossible to combine it with another option and still fullfil the requirements. I guess the original question was somthing like this: The EmployeeType property value must be accessed only by code within the Employee class or within a class derived from the Employee class and modified only by code within the Employee class . In this case E and B would be correct.
July 6, 2017, 02:22 PM
There is no possible correct answer if we need to select 2 options. Only E is correct. You cannot apply E and add an equal or lesser accesibility restriction on any of the accessors. You can't make the accessors protected and leave the property as Internal either. The question is broken.
May 8, 2017, 01:03 PM
Something's wrong here. If the answer B is correct it means property value can only be modified only by code within the Employee and not also within a class derived from the Employee class. And the instruction says it must be accessed AND modified within both.

Question #89 - Topic 1

You are implementing a method named FloorTemperature that performs conversions
between value types and reference types. The following code segment implements the
method. (Line numbers are included for reference only.)

You need to ensure that the application does not throw exceptions on invalid conversions.
Which code segment should you insert at line 04?

A. int result = (int)degreesRef;
B. int result = (int)(double)degreesRef;
C. int result = degreesRef;
D. int result = (int)(float)degreesRef;

Comments for Question #89 - Topic 1 (2)

April 24, 2018, 02:26 PM
Where's the condition that it should be converted to an int before writing it to console? Am I missing something?
March 6, 2018, 11:13 AM
Why is D correct? Because a boxed float can only by unboxed as float and then be converted to int: https://ericlippert.com/2009/03/03/representation-and-identity/

Question #90 - Topic 1

You have the following code:

For each of the following statements, select Yes if the statement is true. Otherwise, select
No.

Question #91 - Topic 1

You have a List object that is generated by executing the following code:

You have a method that contains the following code (line numbers are included for
reference only):

You need to alter the method to use a lambda statement.
How should you rewrite lines 03 through 06 of the method?

A. Option A
B. Option B
C. Option C
D. Option D

Comments for Question #91 - Topic 1 (1)

March 6, 2018, 01:06 PM
Should be: "... rewrite lines 03 through 07 ..."

Question #92 - Topic 1

You are developing an application that implements a set of custom exception types. You
declare the custom exception types by using the following code segments:

The application includes a function named DoWork that throws .NET Framework
exceptions and custom exceptions. The application contains only the following logging
methods:

The application must meet the following requirements:
✑ When ContosoValidationException exceptions are caught, log the information by
using the static void Log (ContosoValidationException ex) method.
✑ When ContosoDbException or other ContosoException exceptions are caught, log
the information by using the static void Log(ContosoException ex) method.
You need to meet the requirements.
How should you complete the relevant code? (To answer, drag the appropriate code
segments to the correct locations in the answer area. Each code segment may be used
once, more than once, or not at all. You may need to drag the split bar between panes or
scroll to view content.)

Question #93 - Topic 1

You are developing an application by using C#.
You have the following requirements:
✑ Support 32-bit and 64-bit system configurations.
✑ Include pre-processor directives that are specific to the system configuration.
✑ Deploy an application version that includes both system configurations to testers.
✑ Ensure that stack traces include accurate line numbers.
You need to configure the project to avoid changing individual configuration settings every
time you deploy the application to testers.
Which two actions should you perform? (Each correct answer presents part of the solution.
Choose two.)

A. Update the platform target and conditional compilation symbols for each application configuration.
B. Create two application configurations based on the default Release configuration.
C. Optimize the application through address rebasing in the 64-bit configuration.
D. Create two application configurations based on the default Debug configuration.

Comments for Question #93 - Topic 1 (1)

March 22, 2018, 11:26 AM
why not A-D? D: Ensure that stack traces include accurate line numbers + Deploy an application version that includes both system configurations to testers A: Support 32-bit and 64-bit system configurations + Include pre-processor directives that are specific to the system configuration

Question #94 - Topic 1

You are developing an application that will transmit large amounts of data between a client
computer and a server. You need to ensure the validity of the data by using a cryptographic
hashing algorithm. Which algorithm should you use?

A. DES
B. HMACSHA512
C. RNGCryptoServiceProvider
D. ECDsa

Question #95 - Topic 1

You are developing an application by using C#.
The application includes an object that performs a long running process.
You need to ensure that the garbage collector does not release the object's resources until
the process completes.
Which garbage collector method should you use?

A. WaitForFullGCComplete()
B. WaitForFullGCApproach()
C. KeepAlive()
D. WaitForPendingFinalizers()

Question #96 - Topic 1

You have the following code (line numbers are included for reference only):

You need to identify the missing line of code at line 15. Which line of code should you
identify?

A. using (fooSqlConn.BeginTransaction())
B. while (fooSqlReader.Read())
C. while (fooSqlReader.NextResult())
D. while (fooSqlReader.GetBoolean(0))

Comments for Question #96 - Topic 1 (2)

October 3, 2017, 08:31 AM
In line 8, the SqlConnection object should be instantiated using the sqlConnectionString variable
June 22, 2017, 09:18 AM
"pub lic" should be "public"

Question #97 - Topic 1

You are developing a class named Temperature.
You need to ensure that collections of Temperature objects are sortable.
How should you complete the relevant code segment? (To answer, drag the appropriate
code segments to the correct locations in the answer area. Each code segment may be
used once, more than once, or not at all. You may need to drag the split bar between
panes or scroll to view content.)

Question #98 - Topic 1

You are developing an application by using C#.
The application includes an object that performs a long running process.
You need to ensure that the garbage collector does not release the object's resources until
the process completes.
Which garbage collector method should you use?

A. WaitForFullGCComplete()
B. SuppressFinalize()
C. collect()
D. RemoveMemoryPressure()

Comments for Question #98 - Topic 1 (3)

July 29, 2018, 06:35 PM
b
March 6, 2018, 01:15 PM
I belive none of the answers is correct. The correct answer should proably be GC.KeepAlive() https://msdn.microsoft.com/en-us/library/system.gc.keepalive(v=vs.110).aspx
June 10, 2017, 06:38 PM
Duplicated questions (98 and 99), with mismatching answers.... How can I even think in pay for this?

Question #99 - Topic 1

You are developing an application by using C#.
The application includes an object that performs a long running process.
You need to ensure that the garbage collector does not release the object's resources until
the process completes.
Which garbage collector method should you use?

A. RemoveMemoryPressure()
B. ReRegisterForFinalize()
C. WaitForFullGCComplete()
D. KeepAlive()

Comments for Question #99 - Topic 1 (1)

May 15, 2017, 11:30 AM
This is quite amusing. Questions 98 and 99 - exactly the same question, different correct answers.

Question #100 - Topic 1

You are developing an application that will transmit large amounts of data between a client
computer and a server. You need to ensure the validity of the data by using a cryptographic
hashing algorithm. Which algorithm should you use?
A. RSA
B. Aes
C. HMACSHA256
D. DES

Comments for Question #100 - Topic 1 (3)

March 13, 2018, 02:17 PM
Answer is HMACSHA256
October 22, 2017, 07:12 PM
whats the answer ?
June 10, 2017, 06:39 PM
Fourth time this questions appears....

Pass with Microsoft MCSD 70-483 exam practice test questions, study guide & training course. After studying all these free questions you can be confident on Microsoft MCSD 70-483 practice test questions and answers from Exam-Labs. Apart from these online questions you can also study Microsoft MCSD 70-483 exam practice test questions and answers in VCE file format which can be opened with Avanset VCE exam simulator.

How It Works

Download Exam
Step 1. Choose Exam
on Exam-Labs
Download IT Exams Questions & Answers
Download Avanset Simulator
Step 2. Open Exam with
Avanset Exam Simulator
Press here to download VCE Exam Simulator that simulates latest exam environment
Study
Step 3. Study
& Pass
IT Exams Anywhere, Anytime!

AUTUMN SALE: 30% DISCOUNT . This is ONE TIME OFFER

You save
30%
Save
Exam-Labs Special Discount

Enter Your Email Address to Receive Your 30% Discount Code

A confirmation link will be sent to this email address to verify your login

* We value your privacy. We will not rent or sell your email address.

AUTUMN SALE: 30% DISCOUNT

You save
30%
Save
Exam-Labs Special Discount

USE DISCOUNT CODE:

A confirmation link was sent to your email.

Please check your mailbox for a message from support@exam-labs.com and follow the directions.