Certification Exam Prep Questions For Programming in C# (70-483)


QuickStart is now offering assessment questions for Programming in C# (70-483) . Whether you are deciding which exam to sign up for, or simply want to practice the materials necessary to complete certification for this course, we have provided a practice assessment to better aid in certification. 100% of the questions are real questions; from a recent version of the test you will take for Programming in C# (70-483).


Arrow
 

1

You are creating a C# application by using Visual Studio 2017. You are implementing performance counters in the code to monitor performance. You need to create a timer that allows you to track the amount of time that has passed since the process started. Which block of code should you write?

2

You use Microsoft .NET Framework 43 to create an application. This configuration exists: < configuration> < system.diagnostics> < switches> < add nameemySwitch" value=1"/> < /switches> < sources> < source rameilMySource> < listeners> < add nameemessages' type="System.DiagnosticsXmlWriterTracelistenee initializeData="C:SSe rviceLog.xm 1'7> cilistenern < /sources> c/system.diagnostics> < /configuration> This code exists: TraceSwitch switch = new TraceSwitchrmySwitch". null): if (switch.TraceError) Trace.TraceErrorcErrofl; if (switch.TraceWarning) Trace.TraceWarning(*Warnine): if (switch.Tracelnfo) Trace.TraceInforInfo'k if (switch.TraceVerbose) Trace.TraceVerboseflerbosel: You need to determine the output of the previous code. Which type of message or messages will be written by the trace output?

3

You use Microsoft .NET Framework 4.5 to create an application. A custom event log named AppCenter exists. You need to write the message Invalid to the custom event log. Which code segment should you use?

4

You use Microsoft NET Framework 4.5 to create an application. The application has static references to AssemblyA and AssemblyB. AssernblyA is compiled against NET Framework 2.0, and AssemblyEl is compiled against NET Framework 4.0. You need to configure the application so that AssemblyA uses NET Framework 2.0 when the application is Which configuration should you use?

5

You use Microsoft .NET Framework 4.5 to create an application. This dass definition exists: public class Classroom public string RoomNumber (get: set) You write this code to create a Classroom instance: Classroom room = new Classroom(); room.RoomNumber = By not altering the Classroom class definition, you must serialize the instance to this XML cClassroom numberelOOKA. You need to write the code to accomplish your goal Which code segment should you use?

6

You use Microsoft .NET Framework AS to create application. This code exists: (PrincipalPermission(SecurityAction.Demand. Rae=-BUILI1N■AUsers' )1 static void SaveData0 { static void Main() SaveDaza0: When the SaveData method is called, an exception of type Security Exception is thrown with the message: Request for principal permission failed. You ensure that the user running the application is a member of the SUILTINUsers group. You need to solve this problem. What should you do?

7

You use Microsoft .NET Framework 4.5 to create an application. This delegate is defined: public delegate string Combine (string s1, string s2); You must declare an instance of the Combine delegate that uses an anonymous method to concatenate the string instances represented by s1 and s2 and return the concatenated string. You need to declare the delegate instance. Which code segment should you use?

8

You are developing a marketing campaign application by using C# and Microsoft Visual Studio 2017. Your application needs to process customer records retrieved from the database. Your code includes a variable named customers, declared as an array of Customer objects. You need to pass each object to a method called AddToCampaign. This method accepts a Customer argument and does not return a value. Which code block correctly processes each customer object?

9

You use Microsoft .NET Framework 4.5 to create an application. You deserialize text-based data into a Memory Stream instance named memory Stream. You need to obtain the contents of the memory Stream instance. Which code segment should you use?9. You use Microsoft .NET Framework 4.5 to create an application. You deserialize text-based data into a Memory Stream instance named memory Stream. You need to obtain the contents of the memory Stream instance. Which code segment should you use?

10

You use Microsoft .NET Framework 2.0 to create an application. During deployment, you discover that the host server contains NET Framework 1.1 and .NET Framework 4.0. You need to configure the application to use NET Framework 4.0. Which configuration should you use?

11

You use Microsoft .NET Framework 4.5 to create an application. This class exists: public class Vehicle { public string Make {get; set;} public string Model {get; set;} public int Year {get; set;} public string Vin {get; set;} public static List< Vehicle> GetVehicles() // Implementation Omitted } } You need to create a query that returns a collection of Vehicle instances where the Make property is set to "Honda". Which code segment should you use?

12

You are developing a web service by using C# and Visual Studio 2017. Your service performs data encryption and decryption operations for other applications. After completing each operation, the company-wide logging system must be used to log information about the data that was encrypted and the application that made the request. To make effective use of available parallel processing resources, you have decided to use the Task Parallel Library (TPL). The logging system is encapsulated by a single class, CompanyLogger. This class uses a series of instance methods to perform the logging operations required by your service. This class is not thread safe. You need to integrate the standard CompanyLogger class with your service. You have decided to make a separate instance available to each thread in your service. Which two statements should you add to make a thread safe CompanyLogger instance available to each thread? (Each correct answer presents part of the solution. Choose two.)

13

You use Microsoft .NET Framework 4.5 to create an application. This method exists: public bool CanAdd(object obj) { } The CanAdd method must return true if the parameter passed to it is an instance of Vehicle or Person. Otherwise it must return false. You need to implement the CanAdd method. Your solution must not throw an exception. Which code segment should you use?

14

You use Microsoft .NET Framework 4.5 to create an application. You must create a class named Mapping Exception to serve as a user-defined exception for your application. Code that throws instances of Mapping Exception must be able to wrap other handled exceptions with your exception. You need to create the Mapping Exception class. Your solution must adhere to Microsoft best practices. Which code segment should you use?

15

You are developing an application by using C# and Microsoft Visual Studio 2017. You are working on a class that requires many arithmetic calculations. Your application performs arithmetic by using the int type. You have discovered that your calculations return incorrect results when working with very large values for certain parameters. You need the calculations to fail immediately with an exception when the calculation exceeds the maximum value for the int type. What should you do?

16

You use Microsoft .NET Framework 4.5 to create an application. This configuration exists: < configuration> < system.diagnostics> < switches> < add name="mySwitch" value="Data Access"/> < switches> < /system.diagnostics> < /configuration> You need to programmatically obtain the value of the mySwitch switch in code. What should you do?

17

You use Microsoft .NET Framework 4.5 to create an application that accesses data in a Microsoft SQL Server 2014 database. You write this code. (Line numbers are for reference only.) 01 using(SqIConnection connection = new SqIConnection(connectionString)) 02 { 03 String query = "Update Group Set Name='Admin' Where ID= 2"; 04 int rowsChanged; 05 06 } You need to execute the query and store the number of rows affected in the rowsChanged variable. What code should you insert at line 05?

18

You use Microsoft .NET Framework 4.5 to create an application. This XML data exists: < Theater> < Movie Title="The Hobbit: An Unexpected Journey" Rating="PG-13" ReleaseDate="1987"/> < Movie Title="The Croods" Rating="PG" ReleaseDate="7> < Movie Title="Escape from Planet Earth" Rating="PG" ReleaseDate="9> You create an XDocument instance named xDoc that contains the previous XML data. You need to use LINQ to XML to set the ReleaseDate attribute of all Movie elements to 2013 if the ReleaseDate attribute is not set. Which code segment should you use?

19

You are writing code that accesses a SQL Server 2012 database. The database has 10 stored procedures that use the following statement: RAISERROR('The value you specified is not valid', 15, 1) You need to handle this error and determine the stored procedure that called it. Your solution must now require you to perform a cast. Which exception should you handle?

A. OdbcException
Incorrect.
B. DbException
Incorrect.
C. Exception
Incorrect.
D. SqlException };
Correct!
20

You use Microsoft .NET Framework 4.5 to create an application. A custom event log named AppCenter exists. You need to write the message Invalid to the custom event log. Which code segment should you use?

21

You use Microsoft .NET Framework 4.5 to create application. This code exists: [PrincipalPermission(SecurityAction.Demand, Role="BUILTIN \\Users")] static void SaveData() { } static void Main() { SaveData(); } When the SaveData method is called, an exception of type SecurityException is thrown with the message: Request for principal permission failed. You ensure that the user running the application is a member of the BUILTIN\Users group. You need to solve this problem. What should you do?

22

You use Microsoft .NET Framework 4.5 to create an application. This class exists: public class Person { public int Age {get; set;} public string Name {get; set;} public static List< Person> GetPeople() { // Implementation Omitted } } You need to call the GetPeople method and sort the list of Person instances by name and then by age. Which code segment should you use?

23

You are developing a managed Microsoft Windows service by using C# and Microsoft Visual Studio 2017. This service generates and caches large report objects. Other applications on the system access these objects through a named pipe to the service. You want the service to signal other processes when a report is ready to access. Which class should you use?

A. ManualResetEvent
Correct!
B. CountdownEvent
Incorrect.
C. AutoResetEvent
Incorrect.
D. AutoResetEvent
Incorrect.
24

You use Microsoft .NET Framework 4.5 to create a multi-threaded application. You are debugging the application. You set a breakpoint at a method named Import lmage. You need to ensure that the breakpoint is hit only when the thread's name is Thread1. Which two debugger properties allow you to accomplish your goal?

25

You are developing a media transcoding library by using C# and Microsoft Visual Studio 2017. You want to declare a class to encapsulate a single work item. Your library requires that the Workltem class contains properties for MediaType and JobID. These properties should be initialized in the constructor. After initialization, code outside of the library should be unable to change the values of these properties. This version of the library does not require custom validation. You need to begin the Workltem class declaration and keep the code as simple as possible. Which code block satisfies these requirements?

26

You use Microsoft .NET Framework 4.5 to create an application. The application must authenticate users by using passwords. You do not want to store the plaintext passwords in the database, but you want to store some type of data in the database to represent the passwords. However, there must be no way for the passwords to be decrypted. You need to choose a class to accomplish your goal. Which class should you use?

A. RSACryptoServiceProvider
Incorrect.
B. SHA1 Managed
Correct!
C. DSACryptoServiceProvider
Incorrect.
D. RijndaelManaged
Incorrect.
PDP Url

Sample Question - Programming in C# (70-483)


Beginner

Difficulty

Course Info

Download PDF

Certificate

See Sample

Buy Individually
Courses Offered In This Certification

Outline

More Information

More Information
Lab Access No
Difficulty Beginner
Language English

Reviews

Write Your Own Review
Only registered users can write reviews. Please Sign in or create an account

Contact A Learning Consultant


click here