In: Computer Science
C# Questions:
55.A class must be ___________________ before objects of that class can be created.
a.added to the Form
b.declared as Private
c.contain properties
d.added to the application’s project
60.If the variable type of the element in a foreach statement cannot be converted to the same variable type as the collection’s objects, ______________.
a.the body of the statement is ignored
b.a syntax error occurs
c.a runtime error occurs
d.a logic error occurs
66.C# views each file as a _____________.
a.sequential stream of bytes
b.sequential stream of bits
c.sequential stream of characters
d.sequential stream of strings
67.____________ is the part of Microsoft’s .NET platform used for interacting with databases.
a.MDB.NET
b.Database.NET
c.Access.NET
d.ADO.NET
e.SQL.NET
68.A(n) ____________ enables you to access and store data without worrying about how the data is organized.
a.MIS
b.Database Management System
c.primary key
69.A ___________ maintains a connection to a database.
a.connection object
b.data reader
c.StreamReader
d.StreamWriter
71.Use a data reader object’s ___________ method to read information from a database.
a.Open
b.ReadData
c.GetRecord
d.Read
e.ReadTable
72.A(n) ___________ is the interface used by a program to access the operating system and various services on the computer.
a.API
b.GDI+
c.IDE
d.GUI
73.Web applications can be created using a combination of C# and Microsoft’s ____________ technology.
a.HTML.NET
b.WWW.NET
c.ASP.NET
d.PHP.NET
74.The ______________ property specifies the item that is selected in the ListBox.
a.SelectedIndex
b.SelectedItem
c.Items
d.Selection
75._____________ allows an application to track data across multiple Web pages.
a.A Response object
b.Client state
c.An instance variable
d.Session state
76.Exception handling requires that you write code to handle ______________.
a.all types of errors
b.only errors that could occur in your code
c.a few of the most common errors
d.only those errors you choose to handle
77.To catch exceptions thrown by a section of code, you must first enclose those lines in a ____________ block.
a.try
b.finally
c.throw
d.exception
78.A catch block that does not specify which type of exception it catches ____________.
a.is a syntax error
b.is useless; it will not catch any type of exception
c.will catch any type of exception that does not already have a handler defined
98.
All C# applications begin execution by calling the ________ method.
a.main()
b.init()
c.start()
d.submain()
55. A class must be "added to the application’s project" before objects of that class can be created. Option: d
60. If the variable type of the element in a foreach statement cannot be converted to the same variable type as the collection’s objects: Option (b). a syntax error occurs
66. C# views each file as a: Option (a). sequential stream of bytes
67. ____________ is the part of Microsoft’s .NET platform used for interacting with databases. Option d. ADO.NET
68. A(n) ____________ enables you to access and store data without worrying about how the data is organized. Option b. Database Management System
69. A ___________ maintains a connection to a database. Option a. a connection object
71. Use a data reader object’s ___________ method to read information from a database. Option d. Read
72. A(n) ___________ is the interface used by a program to access the operating system and various services on the computer. Option a. API
73. Web applications can be created using a combination of C# and Microsoft’s ____________ technology. Option c. ASP.NET
74. The ______________ property specifies the item that is selected in the ListBox. Option b. SelectedItem
75. _____________ allows an application to track data across multiple Web pages. Option a. A Response object
76. Exception handling requires that you write code to handle ______________. Option d. only those errors you choose to handle
77. To catch exceptions thrown by a section of code, you must first enclose those lines in a ____________ block. Option a. try
78. A catch block that does not specify which type of exception it catches ____________. Option c. will catch any type of exception that does not already have a handler defined
98. All C# applications begin execution by calling the ________ method. Option a. main()