Visual Studio Interview Questions and Answers (81) - Page 3

Which statement is true of Delegate in Dot Net?

NOTE: This is objective type question, Please click question title for correct answer.
Which operator is used to initialize or invoke delegate event or event handler?

NOTE: This is objective type question, Please click question title for correct answer.
Which operator is used to remove delegate event or event handler?

NOTE: This is objective type question, Please click question title for correct answer.
Which statement(s) is/are correct about Namespace?

NOTE: This is objective type question, Please click question title for correct answer.
What are the advantages over Namespaces?

Following are the advantages of Namespaces:-
1). We can establish security, version, reference, and deployment boundaries by using namespaces.
2). Because of grouping of namespaces, we can create hierarchy which is easy to identify classes by fully qualified names.
What are the features of Read-Only variables?

NOTE: This is objective type question, Please click question title for correct answer.
How To get Web Site Visitor IP Address in Dot Net?

To get IP address of web site visitor,we can use below code as:-


string Visitor_IP_Address = Request.UserHostAddress.ToString();

What is an alternate way to get Web Site Visitor IP Address in Dot Net?

We can use REMOTE_ADDR from ServerVariables collection as:-
string Visitor_IP_Address = Request.ServerVariables["REMOTE_ADDR"];

How to use SqlBulkCopy in C#?

Let's assume that,we have a datatable:-
using (SqlBulkCopy bulkCopy = new SqlBulkCopy(connectionString, SqlBulkCopyOptions.KeepIdentity))

{
bulkCopy.DestinationTableName =
"your_table_name";
try
{
bulkCopy.WriteToServer(dt);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
finally
{
}
}

Where,dt is our Datatable Object.
When to Use Structures in Dot Net?

NOTE: This is objective type question, Please click question title for correct answer.
When to use a Delegates?

NOTE: This is objective type question, Please click question title for correct answer.
When to use an Interface?

NOTE: This is objective type question, Please click question title for correct answer.
When to use an Inheritance?

NOTE: This is objective type question, Please click question title for correct answer.
Give any one example of an Inheritance.

We can understand an Inheritance as:-
Take two class as Game and Cricket.

Cricket is a game is valid - Inheritance
Cricket has a game is invalid - Composition

What is the Root Namespace Of Dot Net?

The System Namespace is the Root Namespace for fundamental types in the Dot Net Framework.This Namespace includes classes that represent the base data types used by all applications.
Which class is a Base Class of all classes in the .NET Framework?

NOTE: This is objective type question, Please click question title for correct answer.
What statement is(are) true about CHAR Type?

NOTE: This is objective type question, Please click question title for correct answer.
System.Exception Includes?

NOTE: This is objective type question, Please click question title for correct answer.
Which is the base class?

NOTE: This is objective type question, Please click question title for correct answer.
Collection classes provide support for?

NOTE: This is objective type question, Please click question title for correct answer.
Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Interview Questions and Answers Categories