C# Essentials Quiz Questions and Answers

Answer :
  • Language Integrated Query

Explanation :

LINQ stands for Language Integrated Query. LINQ is a data querying methodology which provides querying capabilities to .NET languages with syntax similar to a SQL query.
Answer :
  • A) ConnectionString: It provides information, such as database name and user credentials for database access and so on.
    B) Open(): Opens the connection for accessing the database.
    C) Close(): Closes the connection to the database.
    All of the above

Explanation :

The connection component of a dataprovider establishes a connection with a database. To connect to Microsoft SQL Server, you use the SQL connection class.
Answer :
  • A) Indexer allows classes to be used in more intuitive manner.
    B) Indexers which are used for treating an object as an array.
    C) The indexers are usually known as smart arrays in C#.
    All of the above

Explanation :

An indexer, also called an indexed property, is a class property that allows you to access a member variable of a class using the features of an array.
Answer :
  • System.Data.SqlClient

Explanation :

The SqlParameter class is found in the "System.Data.SqlClient" namespace. It is a class of a connected architecture of .NET framework.
Answer :
  • [ServiceContract(Name="MyService", Namespace="http://tempuri.org")]

Explanation :

It is used to declare the type as a Service Contract. It can be declared without any parameters but it can also take named parameters
Answer :
  • Both of the above.

Explanation :

IEnumerable is the parent interface for all non-generic collections in System.Collections namespace like ArrayList, HastTable etc.
Answer :
  • A) Service Orientation
    B) Interoperability
    C) Multiple Message Patterns
    All of the above

Explanation :

Windows Communication Foundation (WCF) is a secure, reliable, and scalable messaging platform for the .NET Framework 3.0
Answer :
  • /// Write Your Remarks

Explanation :

XML documentation comments are a special kind of comment, added above the definition of any user-defined type or member.
Answer :
  • A) It describes the external format of data passed to and from service operations.
    B) It defines the structure and types of data exchanged in service messages.
    C) It maps a CLR type to an XML Schema
    All of the above

Explanation :

A data contract is a formal agreement between a service and a client that abstractly describes the data to be exchanged.
Answer :
  • A) Read/Write
    B) Read Only
    C) Write Only
    All of the above

Explanation :

Properties are members that provide a flexible mechanism to read, write or compute the values of private fields.