1. Question: You want to copy an existing file, File1.txt, to File2.txt. Which code samples do this correctly? (Choose two. Each answer forms a complete solution.) - VB.NET

    A
    Dim fi as new File()
    fi.Copy("file1.txt", "file2.txt")

    B
    File.Copy("file1.txt", "file2.txt")

    C
    Dim fi As New FileInfo("file1.txt")
    fi.CreateText()
    fi.CopyTo("file2.txt")

    D
    Dim fi As New FileInfo("file1.txt")
    fi.CopyTo("file2.txt")

    Note: Not available
    1. Report
  2. Question: You want to create a stream that you can use to store a file temporarily while your application processes data. After all data processing is complete, you want to write it to the file system. It’s important that you minimize the time that the file is locked. Which class should you use? - VB.NET

    A
    MemoryStream

    B
    BufferedStream

    C
    GZipStream

    D
    FileStream

    Note: Not available
    1. Report
  3. Question: You want to read a standard text file and process the data as strings. Which classes can you use? (Choose two. Each answer forms a complete solution.) - VB.NET

    A
    GZipStream

    B
    TextReader

    C
    StreamReader

    D
    BinaryReader

    Note: Not available
    1. Report
  4. Question: You need to store data to isolated storage in such a way that other applications that are run by the same user and other users running the same application cannot access the data directly. Which method should you call to create the IsolatedStorageFile object? - VB.NET

    A
    IsolatedStorageFile.GetUserStoreForAssembly()

    B
    IsolatedStorageFile.GetMachineStoreForAssembly()

    C
    IsolatedStorageFile.GetUserStoreForDomain()

    D
    IsolatedStorageFile.GetMachineStoreForDomain()

    Note: Not available
    1. Report
  5. Question: You are writing an application to update absolute hyperlinks in HTML files. You have loaded the HTML file into a string named s. Which of the following code samples best replaces http:// with https://, regardless of whether the user types the URL in uppercase or lowercase? - VB.NET

    A
    s = Regex.Replace(s, "http://", "https://")

    B
    s = Regex.Replace(s, "https://", "http://")

    C
    s = Regex.Replace(s, "http://", "https://", RegexOptions.IgnoreCase)

    D
    s = Regex.Replace(s, "https://", "http://", RegexOptions.IgnoreCase)

    Note: Not available
    1. Report
  6. Question: You are writing an application to process data contained in a text form. Each file contains information about a single customer. The following is a sample form:
    First Name: Tom
    Last Name: Perham
    Address: 123 Pine St.
    City: Springfield
    State: MA
    Zip: 01332
    You have read the form data into the String variable s. Which of the following code samples correctly stores the data portion of the form in the fullName, address, city, state, and zip variables? - VB.NET

    A
    Dim p As String = "First Name: (?<firstName>.*$)\n" + _
    "Last Name: (?<lastName>.*$)\n" + _
    "Address: (?<address>.*$)\n" + _
    "City: (?<city>.*$)\n" + _
    "State: (?<state>.*$)\n" + _
    "Zip: (?<zip>.*$)"
    Dim m As Match = Regex.Match(s, p, RegexOptions.Multiline)
    Dim fullName As String = m.Groups("firstName").ToString + " " + _
    m.Groups("lastName").ToString
    Dim address As String = m.Groups("address").ToString
    Dim city As String = m.Groups("city").ToString
    Dim state As String = m.Groups("state").ToString
    Dim zip As String = m.Groups("zip").ToString

    B
    Dim p As String = "First Name: (?<firstName>.*$)\n" + _
    "Last Name: (?<lastName>.*$)\n" + _
    "Address: (?<address>.*$)\n" + _
    "City: (?<city>.*$)\n" + _
    "State: (?<state>.*$)\n" + _
    "Zip: (?<zip>.*$)"
    Dim m As Match = Regex.Match(s, p)
    Dim fullName As String = m.Groups("firstName").ToString + " " + _
    m.Groups("lastName").ToString
    Dim address As String = m.Groups("address").ToString
    Dim city As String = m.Groups("city").ToString
    Dim state As String = m.Groups("state").ToString
    Dim zip As String = m.Groups("zip").ToString

    C
    Dim p As String = "First Name: (?<firstName>.*$)\n" + _
    "Last Name: (?<lastName>.*$)\n" + _
    "Address: (?<address>.*$)\n" + _
    "City: (?<city>.*$)\n" + _
    "State: (?<state>.*$)\n" + _
    "Zip: (?<zip>.*$)"
    Dim m As Match = Regex.Match(s, p, RegexOptions.Multiline)
    Dim fullName As String = m.Groups("<firstName>").ToString + " " + _
    m.Groups("<lastName>").ToString
    Dim address As String = m.Groups("<address>").ToString
    Dim city As String = m.Groups("<city>").ToString
    Dim state As String = m.Groups("<state>").ToString
    Dim zip As String = m.Groups("<zip>").ToString

    D
    Dim p As String = "First Name: (?<firstName>.*$)\n" + _
    "Last Name: (?<lastName>.*$)\n" + _
    "Address: (?<address>.*$)\n" + _
    "City: (?<city>.*$)\n" + _
    "State: (?<state>.*$)\n" + _
    "Zip: (?<zip>.*$)"
    Dim m As Match = Regex.Match(s, p)
    Dim fullName As String = m.Groups("<firstName>").ToString + " " + _
    m.Groups("<lastName>").ToString
    Dim address As String = m.Groups("<address>").ToString
    Dim city As String = m.Groups("<city>").ToString
    Dim state As String = m.Groups("<state>").ToString
    Dim zip As String = m.Groups("<zip>").ToString

    Note: Not available
    1. Report
  7. Question: Which of the following regular expressions matches the strings zoot and zot? - VB.NET

    A
    z(oo)+t

    B
    zo*t$

    C
    $zo*t

    D
    ^(zo)+t

    Note: Not available
    1. Report
  8. Question: Which of the following strings match the regular expression ^a(mo)+t.*z$? (Choose all that apply.) - VB.NET

    A
    amotz

    B
    amomtrewz

    C
    amotmoz

    D
    atrewz

    E
    amomomottothez

    Note: Not available
    1. Report
  9. Question: Which of the following encoding types would yield the largest file size? - VB.NET

    A
    UTF-32

    B
    UTF-16

    C
    UTF-8

    D
    ASCII

    Note: Not available
    1. Report
  10. Question: Which of the following encoding types support Chinese? (Choose all that apply.) - VB.NET

    A
    UTF-32

    B
    UTF-16

    C
    UTF-8

    D
    ASCII

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd