Exam Code: 70 483 programming in c# dumps pdf (Practice Exam Latest Test Questions VCE PDF)
Exam Name: Programming in C#
Certification Provider: Microsoft
Free Today! Guaranteed Training- Pass mcsd 70 483 Exam.
Q111. DRAG DROP - (Topic 2)
You have an application that uses paging. Each page displays 10 items from a list.
You need to display the third page. (Develop the solution by selecting and ordering the required code snippets. You may not need all of the code snippets.)
Answer:
Q112. DRAG DROP - (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.)
Answer:
Q113. - (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");
Answer: D
Explanation:
Assembly.LoadFile - Loads the contents of an assembly file on the specified path. http://msdn.microsoft.com/en-us/library/b61s44e8.aspx
Q114. DRAG DROP - (Topic 2)
You are developing an application that will write data to a file. The application includes the following code segment. (Line numbers are included for reference only.)
You need to ensure that the WriteData() method will write data to a file.
Which four code segments should you insert in sequence at line 03? (To answer, move the appropriate code segments from the list of code segments to the answer area and arrange them in the correct order.)
Answer:
Q115. HOTSPOT - (Topic 2)
You are developing the following classes named:
Class1
Class2
Class3
All of the classes will be part of a single assembly named Assembly.dll. Assembly.dll will be used by multiple applications.
All of the classes will implement the following interface, which is also part ofAssembly.dll:
public interface Interface1 { void Method1(decimal amount); void Method2(decimal amount); }
You need to ensure that the Method2 method for the Class3 class can be executed only when instances of the class are accessed through the Interface1 interface. The solution must ensure that calls to the Method1 method can be made either through the interface or through an instance of the class.
Which signature should you use for each method? (To answer, select the appropriate signature for each method in the answer area.)
Answer:
Q116. - (Topic 2)
You are developing an application that includes methods named ConvertAmount and TransferFunds.
You need to ensure that the precision and range of the value in the amount variable is not lost when the TransferFunds() method is called.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
Explanation: Simply use float for the TransferFunds parameter.
Note:
* The float keyword signifies a simple type that stores 32-bit floating-point values.
* The double keyword signifies a simple type that stores 64-bit floating-point values
Q117. - (Topic 2)
You are creating a console application named Appl.
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. Option A
B. Option B
C. Option C
D. Option D
Answer: B
Explanation: The JavaScriptSerializer Class Provides serialization and deserialization functionality for AJAX-enabled applications.
The JavaScriptSerializer class is used internally by the asynchronous communication layer to serialize and deserialize the data that is passed between the browser and the Web server. You cannot access that instance of the serializer. However, this class exposes a public API. Therefore, you can use the class when you want to work with JavaScript Object Notation (JSON) in managed code.
Q118. - (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
Answer: A
Explanation: *For the requirement to use an OrderDate value other than null use: OrderDate.Value != null
*For the requirement to use an OrderDate value for this year or a later year use: OrderDate.Value>= year
Q119. - (Topic 2)
You need to write a method that retrieves data from a Microsoft Access 2013 database. The method must meet the following requirements:
Be read-only.
Be able to use the data before the entire data set is retrieved.
Minimize the amount of system overhead and the amount of memory usage.
Which type of object should you use in the method?
A. DbDataReader
B. DataContext
C. unTyped DataSet
D. DbDataAdapter
Answer: C
Explanation: DbDataReader Class
Reads a forward-only stream of rows from a data source.
Q120. - (Topic 2)
You have the following code:
You need to retrieve all of the numbers from the items variable that are greater than 80. Which code should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: B
Explanation: Enumerable.Where<TSource> Method (IEnumerable<TSource>,
Func<TSource, Boolean>)
Filters a sequence of values based on a predicate.
Example:
List<string> fruits =
new List<string> { "apple", "passionfruit", "banana", "mango",
"orange", "blueberry", "grape", "strawberry" };
IEnumerable<string> query = fruits.Where(fruit => fruit.Length < 6);
foreach (string fruit in query)
{
Console.WriteLine(fruit);
}
/*
This code produces the following output:
apple
mango
grape */