15
1 . Who developed .NET ? A. Oracle B. Microsoft C. Wipro D. Sun Microsystems 2 . What is .NET ? A. Database B. Programming Language C. Operating System D. Framework 3 . You create 4 forms FormA, FormB, FormC and FormD. You want to allow users to open FormA, FormB and FormC at the same time within FormD. Which properties do you need to set? A. IsMdiChild on Forms A,B and C; and IsMdiParent on FormD. B. MdiParent on Forms A,B and C; and IsMdiContainer on FormD. C. IsMdiChild on Forms A,B and C; and IsMdiContainer on FormD. D. MdiParent on Forms A,B and C; and IsMdiParent on FormD.

Dotnet Questions

  • Upload
    dinups

  • View
    347

  • Download
    0

Embed Size (px)

DESCRIPTION

Asp.netQuestions Dotnet QuestionsAspdotnetQuestions

Citation preview

Page 1: Dotnet Questions

1 . Who developed .NET ?

A. Oracle

B. Microsoft

C. Wipro

D. Sun Microsystems

2 . What is .NET ?

A. Database

B. Programming Language

C. Operating System

D. Framework

3 . You create 4 forms FormA, FormB, FormC and FormD. You want to allow users to open FormA, FormB and FormC at the same time within FormD. Which properties do you need to set?

A. IsMdiChild on Forms A,B and C; and IsMdiParent on FormD.

B. MdiParent on Forms A,B and C; and IsMdiContainer on FormD.

C. IsMdiChild on Forms A,B and C; and IsMdiContainer on FormD.

D. MdiParent on Forms A,B and C; and IsMdiParent on FormD.

Page 2: Dotnet Questions

4 . You want to create custom properties for your control, which the user can set using the Properties window of the Visual Studio IDE. What attribute can you use to control the visibility of the properties in the Properties window in the Visual Studio IDE?

A. DebuggerBrowsable

B. ComVisible

C. Browsable

D. DisplayBrowsable

5 . You have added a button named Bt1 to your form, whose Text is "Go". You want to assign a shortcut to the button, so that whenever a user presses ALT+G, the Click event of the button Bt1 is raised. What code should you use?

A. Bt1.Text = @"Go";

B. Bt1.Text = "&Go";

C. Bt1.Text = "&&Go";

D. Bt1.Text = "@Go";

6 . You are creating a setup and deployment project for your application. You want to ensure that the .NET Framework 2.0 is installed on the computers of the users who want to install your application. Which deployment editor should you use?

A. Registry Editor

B. Launch Conditions Editor

C. File System Editor

D. Required Components Editor

Page 3: Dotnet Questions

7 . Which property of the WebBrowser control should you use in order to navigate to a specified URL?

A. NavigateUrl

B. DocumentUrl

C. Url

D. PageUrl

8 . You use a TransactionScope in your application in your application in order to use transaction semantics. What code should you use in order to commit the transaction within the transaction scope?

A. TransactionScope.Completed = true;

B. TransactionScope.IsCompleted = true;

C. TransactionScope.Complete();

D. TransactionScope.Commit();

9 . You add a PrintPreviewDialog ppd1 to your Windows Form, in order for your users to preview the document which they want to print. Which property of ppd1 should you set in order to specify the document to preview?

A. PreviewDocument

B. PrintDocument

C. ActiveDocument

D. Document

Page 4: Dotnet Questions

10 . You decide to use named parameters in a SqlCommand object in order to execute SQL queries on a database. You have a parameter named "CustomerName". How do you refer to it within the SQL query text in the SqlCommand object?

A. "?CustomerName"

B. "@CustomerName"

C. "%CustomerName"

D. "#CustomerName"

11 . You have a textbox control on your form. You want to store some custom data associated with that object. This data should not be visible to the user it is meant for internal use in your application. What code should you use?

A. Use the Text property.

B. Use the UserInfo property.

C. Use the Tag property.

D. Use the CustomData property.

12 . Which function of the SqlCommand object must you use in order to execute an "INSERT" Sql Query?

A. ExecuteScalar();

B. ExecuteCommand();

C. ExecuteReader();

D. ExecuteNonQuery();

Page 5: Dotnet Questions

13 . You want to access web sites on the internet using HTTP. Which of the classes below can you use?

A. System.Net.HttpClient

B. System.Net.WebClient

C. Sytem.Net.InetClient

D. System.Net.HttpWebRequest

14 . You want to create a reusable control by combining existing Windows Controls in order to use it in various of your applications. What should the base class of your control be?

A. System.Windows.Forms.UserControl

B. System.Windows.Forms.Control

C. System.Windows.Forms.WindowsControl

D. System.Windows.Forms.Component

15 . You have a .xml file, and the corresponding .xsd. Which class should you use to validate the xml against the corresponding schema file?

A. XmlValidatingReader

B. XmlDictionaryReader

C. XmlReader

D. XmlSchemaReader

Page 6: Dotnet Questions

16 . You dynamically create a TextBox control tb1 in code at runtime. You want to associate an event handler with tb1 that gets fired when the user clicks tb1. What operator will you use to associate the event handling function with the Click event of tb1?

A. &=

B. +=

C. =

D. |=

17 . Your application assemblies need to be installed into the Global Assembly Cache. What deployment strategy should you adopt?

A. Create a Setup Application

B. Use XCOPY to copy the files

C. Create a CAB project

D. Use ClickOnce.

18 . What method of the Xml DOM model will you use to delete a node from an Xml document?

A. RemoveParent

B. RemoveSibling

C. RemoveChild

D. RemoveNode

Page 7: Dotnet Questions

19. You have code that executes SQL statements on a database within the context of a SQLTransaction. You want to ensure that no user can perform any updates in the database until your transaction is complete. What IsolationLevel should you use?

A. ReadCommitted

B. Chaos

C. ReadUncommitted

D. Serializable

20 . You want to make your application accessible to physically challenged users. Consider Windows Narrator. When controls receive focus, the Narrator speaks out the information given to it. Which properties does the Narrator speak out for a windows control?

A. Name

B. AccessibleName

C. Description

D. AccessibleDescription

Page 8: Dotnet Questions

ADO.NET

. Which .net Data Provider offers best performance when connected to SQLServer Database ?

A. OLEDB provider

B. ODBC provider

C. SQLServer .NET Data Provider

D. SQLServer Data provider

2 . What is the Best approach that has to be used, if you need continuous connection to the Database ?

A. ADO.NET

B. ADO

C. Both

D. None of the above

3 . Which of the following statements is true about Dataset ?

A. Dataset can store only one table in its cache

B. Dataset cannot store any tables in the cache

C. Dataset stores tables in the cache,only when cache set to true

D. Dataset can store multiple tables in cache

4 . The Databases that make up the data in a dataset

A. Should be from Single database source

Page 9: Dotnet Questions

B. Can be from multiple databases bases which are homogeneous

C. Can include many heterogeneous databases sources

D. None of the above

5 . In ADO, the data from one component to other is sent in Binary format, where as in ADO.Net it is sent in

A. Binary format only

B. Text Stream

C. XML Format

D. None of the above

6 . Which object of ado.net has the best performance,for retrieving the data

A. DataSet

B. DataReader

C. Data Provider

D. Data Adapter

7 . No of records in memory at any given point of time when the DataReader reads the Data

A. All reacords pulled by the reader

B. Only one record at a time

C. Depends on the data provider

Page 10: Dotnet Questions

D. Depends on the data source

8 . Which type of Dataset supports schema ?

A. Typed

B. UnTyped

C. Mixed

D. All types

9 . Which Dataset gives easier access to the contents of the table ?

A. UnTyped

B. Mixed

C. Typed

D. All types

10 . How do the SQL classes in .Net Communicate to SQLServer ?

A. TDS - Tabular Data Stream

B. OLEDB

C. ODBC

D. None of the above

11 . Which of the following Namespace is used for better performance when connecting to SQLServer ?

Page 11: Dotnet Questions

A. System.Data

B. System.Data.SQLClient

C. System.Data.Oledb

D. System.Data.OracleClient

12 . If the DSN (Data Source Name) has to be used with SQL Server, which namespace has to be imported ?

A. System.Data.SQLClient

B. Sytem.Data.ODBC

C. System.Data.OracleClient

D. System.Data.Oledb

13 . When we need to retrieve only a single value from the Database,which Method is efficient

A. ExecuteReader()

B. ExecuteScalar()

C. ExecuteNonQuery()

D. ExecuteXmlReader()

14 . If we are not returning any records from the database which method is used

A. ExecuteReader ()

B. ExecuteScalar ()

Page 12: Dotnet Questions

C. ExecuteXmlReader()

D. ExecuteNonQuery()

15 . OLEDB Connection Pooling is handled by OLEDB.Net Provider and SQLClient Connection pooling is handled by

A. OLEDB Provider

B. SQL Provider

C. Windows 2000 Component Service

D. ODBC provider

16 . Which object in ADO.Net is similar to the Recordset object of ADO ?

A. DataSet

B. DataReader

C. DataProvider

D. DataAdaptor

17 . State whether the following statement is true or false.ADO.NET does not have the inherent cursor object but has data classes that include functionality of cursors

A. False

B. True

C. Both 1 and 2

D. None of the above

Page 13: Dotnet Questions

18 . To populate the data set, which methord of DataAdapter is uesd

A. GetData()

B. FillData()

C. FillDataset()

D. Fill()

19 . Which of the following statement is true ?

A. ADO.net is slower than Ado

B. Ado.net is faster than ado on all counts of connected and disconnected recordsets

C. Ado.net is faster than ADO for disconnected recordsets because under ADO, COM marshalling between tiers requires that values in a recordset be converted to values recognized by COM

D. ADO.net is slower than Ado for disconnected recordsets because under Ado.net, COM marshalling between tiers requires that values in a recordset be converted to values recognized by COM

20 . Two users are trying to update the row in a database at the same time.Assuming that optimistic concurrency is not used for concurrency control in this case, what will be the result ?

A. The Second Update overwrites the first update

B. Error will be raised when the Second update happens

C. Second update does not happen at all

D. None of the above