Question:you have recently written the code shown below:
Dim emailAddresses As New Hashtable()
emailAddresses.Add("Mia", "mia@ Certkiller .com")
emailAddresses.Add("Andy", "andy@ Certkiller .com")
emailAddresses.Add("Kara", "kara@ Certkiller .com")
You need to ensure that these e-mail addresses are stored in the Email.dat file so that you can
load them
again
when the user restarts the application.
What should you do? - (VB.NET)
A Add the following code:
Dim stream As New FileStream("Email.dat", FileMode.Create)
Dim formatter As New BinaryFormatter()
formatter.Deserialize(stream, emailAddresses)
B Add the following code:
Dim stream As New FileStream("Email.dat", FileMode.Create)
Dim formatter As New BinaryFormatter()
formatter.Serialize(stream, emailAddresses)
C Add the following code:
Dim stream As New FileStream("Email.dat", FileMode.Create)
stream.Serialize(emailAddresses)
D Add the following code:
Dim stream As New FileStream("Email.dat", FileMode.Create)
stream.WriteObject(emailAddresses)