Preview

CHAPTER08

Powerful Essays
Open Document
Open Document
2686 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
CHAPTER08
Chapter 8 Text Files
Section 8.1 Managing Text Files
1.

What method is used to copy the contents of a string array or LINQ query into a text file?
(A)
(B)
(C)
(D)

2.

Which of the following methods is used to change the words in a column header of a
DataGridView control?
(A)
(B)
(C)
(D)

3.

CreateTextFile
WriteAllLines
CopyToTextFile
ReadAllLines
B

HeaderText
HeaderName
HeaderContent
HeaderCaption
A

What property is set to False in order to remove the row header column on the left side of a
DataGridView control?
(A)
(B)
(C)
(D)

ShowRowHeader
DisplayRowHeader
RowHeaderVisible
RowHeaderEnabled
C

4.

A statement of the form IO.File.WriteAllLines("fileName.txt", numArray) copies the contents of the numeric array numArray into a text file. (T/F)
F

5.

The acronym CSV stands for "Comma Separated Values". (T/F)
T

6.

Each record of the file UN.txt contains four pieces of information (name, continent, population in millions, area) about one of the 192 member countries of the United Nations.
The first two lines of the file are
Afghanistan,Asia,28.2,251772
Albania,Europe,3.2,11100

What is the first line of the file created by the following code?
Dim query = From line In IO.File.ReadAllLines("UN.txt")
Let data = line.Split(","c)
Let country = data(0)
Let continent = data(1)
Select country & " is in " & continent
IO.File.WriteAllLines("NewFile.txt", query)

(A)
(B)
(C)
(D)
7.

Afghanistan is in Asia
Albania is in Europe country is in continent

The new file will be empty.
A

Each line of the file UN.txt contains four pieces of information (name, continent, population in millions, area) about one of the 192 member countries of the United Nations. The first two lines of the file are
Afghanistan,Asia,28.2,251772
Albania,Europe,3.2,11100

What is the first line of the file created by the following code?
Dim query = From line In IO.File.ReadAllLines("UN.txt")
Let data = line.Split(","c)
Let country = data(0)
Let population = 1000000 * CDbl(data(2))
Select country & "," &

You May Also Find These Documents Helpful

  • Good Essays

    CGS 2531 Notes Ch. 1-5

    • 2861 Words
    • 11 Pages

    Right click the letter or row number for which you want to insert a new column to the left or a new row above……

    • 2861 Words
    • 11 Pages
    Good Essays
  • Satisfactory Essays

    Pt1420 Unit 4

    • 380 Words
    • 2 Pages

    To _____delete_______ a row, click to the left of the row in the left margin.…

    • 380 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Ap Calculus

    • 2722 Words
    • 11 Pages

    | The identification of a specific cell by its intersecting column letter and row number.…

    • 2722 Words
    • 11 Pages
    Powerful Essays
  • Powerful Essays

    Busa 3000 Country Paper

    • 1514 Words
    • 7 Pages

    “CIA - The World Factbook." Welcome to the CIA Web Site — Central Intelligence Agency. Web. 15 Sept. 2011. .…

    • 1514 Words
    • 7 Pages
    Powerful Essays
  • Good Essays

    chapter01

    • 7053 Words
    • 24 Pages

    In PKI environments, entities called registration authorities and certificate authorities require proof of identity from individuals requesting a certificate, which will then be validated.…

    • 7053 Words
    • 24 Pages
    Good Essays
  • Powerful Essays

    Chapter 02

    • 1790 Words
    • 7 Pages

    Fiscal policies refer to government efforts to influence the economy through taxation without representation and spending decisions that are designed to encourage growth. Monetary policies refer to actions that shape the economy by influencing interest rates and the supply of money. Politics plays a role by making taxes higher and by influencing interest rates.…

    • 1790 Words
    • 7 Pages
    Powerful Essays
  • Good Essays

    196 countries around the world, including all the Member States of WHO. Their aim is to help the…

    • 240 Words
    • 1 Page
    Good Essays
  • Satisfactory Essays

    lolz

    • 480 Words
    • 4 Pages

    8. How do you add a line to the end of an existing file "myfile" with date stamp. (1)…

    • 480 Words
    • 4 Pages
    Satisfactory Essays
  • Better Essays

    "CIA - The World Factbook." Welcome to the CIA Web Site — Central Intelligence Agency. 9 Nov. 2010. Web. 21 Nov. 2010. .…

    • 1178 Words
    • 5 Pages
    Better Essays
  • Good Essays

    Skinhead Violence

    • 727 Words
    • 3 Pages

    33 countries. The ages of members range from 13 to 25 in which half the members…

    • 727 Words
    • 3 Pages
    Good Essays
  • Good Essays

    CHAPTER07

    • 5365 Words
    • 46 Pages

    It is invalid since more than one array is dimensioned by a single Dim statement.…

    • 5365 Words
    • 46 Pages
    Good Essays
  • Satisfactory Essays

    Chapter1

    • 737 Words
    • 3 Pages

    Responsible Investing Values-Driven and Profit-Seeking (S)RI Dr. Jeroen Derwall November 20, 2012 Equity Analysis and Portfolio Management (EBC4112) – Week 4 Agenda  What is (S)RI and related concepts  Equity RI: theory and evidence  “Values” and “social norms”: what are the effects of ethical exclusion on returns?  What do we need to know to obtain positive returns/alpha?…

    • 737 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    str = "insert into Staff values(" & Text1.Text & ",'" & Text2.Text & "', " & Text3.Text & "," & Text4.Text & ",'" & Text5.Text & "')"…

    • 270 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Saarc

    • 2224 Words
    • 9 Pages

    th member. The people of its member countries are around 1.5 billion. In terms of population itssphere of influence…

    • 2224 Words
    • 9 Pages
    Powerful Essays
  • Best Essays

    Mister

    • 4697 Words
    • 19 Pages

    from each other. The original titles of the columns have been retained, but some editing of the content has taken place.…

    • 4697 Words
    • 19 Pages
    Best Essays

Related Topics