Question:You have recently completely creating a new application for Certkiller .com.
This new application has to load an instance of the Inventory class from a large file named
Inventory.dat.
You need to ensure that the application executes the loading process in as little time as
possible.
What should you do? - (VB.NET) 

A Use the following code:
Dim readStream As New FileStream("Inventory.dat", FileMode.Open)
Dim readFormatter As New BinaryFormatter()
Dim currentInventory As Inventory = DirectCast(readFormatter.FastDeserialize(readStream),
Inventory) 

B Use the following code:
Dim readStream As New FileStream("Inventory.dat", FileMode.Open)
Dim readFormatter As New BinaryFormatter()
Dim currentInventory As Inventory = DirectCast(readFormatter.Deserialize(readStream),
Inventory) 

C Use the following code:
Dim readStream As New FileStream("Inventory.dat", FileMode.Open)
Dim readFormatter As New BinaryFormatter()
Dim currentInventory As Inventory = DirectCast(readFormatter.UnsafeDeserialize(readStream),
Inventory) 

D Use the following code:
Dim readStream As New FileStream("Inventory.dat", FileMode.Open)
Dim readFormatter As New BinaryFormatter()
Dim currentInventory As Inventory = DirectCast(readFormatter.SafeDeserialize(readStream),
Inventory) 

+ Answer
+ Report
Total Preview: 853

Copyright © 2024. Powered by Intellect Software Ltd