C# Exclusive Interview Questions and Answers (453) - Page 12

  • A joint initiative from DotNetFunda.Com and Questpond.
  • A one stop place on the internet to get trusted and proven Interview Questions (based on more than a decade of experience in this field) to ensure the success of the candidates.
  • You will find almost all Interview questions from Questpond here and this list is growing day by day with all latest and updated interview questions.

453 records found.

Get 650+ Questpond's Interview videos on discount

What is the difference between Start Debugging and Start Without Debugging

Complier allows user to manually track flow of the application code with Start
Debugging option. Start without debugging directly runs the application.
public static void Main(String[] args)? Why static

static methods are automatically loaded into memory when class is loaded in to
memory so with out creating the object the clr calls the main method
Is the use of Module supported in C#

NO, its not supported in C# but it is supported in VB
Why is it not a good practice to use Module in a project

Because every public member of a module is treated as Global Member and it can
be accessed in any part of the application without explicitly using
module name and this is against object oriented principles
what is the difference between Module and Class

Both class and module are a collection of methods and properties. The major
difference is that instances can be created from a class in the form of
objects, but not from a module. The scope of the members of a class is
only for the lifetime of the object, but the scope of the members of a
module exist for the life of the program.
What is a managed provider

Managed Provider is a .Net Component which implements a standard set of
interfaces provided by MS for a specific type of database.
Which one of the following is preferred in fetching data from sqldatareader. dr[i] or dr.GetX(i)

GetX(i) is preferred because , we don't have to cast unlike dr[i] which returns an object and have to be casted.
What are the important methods of an SqlDataReader object

dr.Read()---------->
If true,advances the data reader to next record.
dr.GetOrdinal()----->Gets the column ordinal given the name.
dr.GetName()---------->Gets the name of the specified column.
dr.IsDBNull()----------->Gets a value that indicates whether a column
contains missing values.
dr.NextResult()----------->Advances datareader to next result,when
reading the results of a batch of T-sql statements.
dr.GetX()------------------->To get the value,where X is a datatype.
When should we use Oledb provider to SqlClient

If we need to communicate with MS sql server version 6.5 or earlier.
How can we specify port number in Connection String in App.Config file

Connection String="Server=.\sqlexpress,portnumber;Database=dbname;Uid=dbuser;
Pwd=dbpassword"Here we can specify the port number which we want to use
@@Identity contains last identity value over given connection. Yes/No? If Yes Justify

Yes.Select@@Identity contains last identity value over given connection and is different for every SqlConnection
can we have multiple .config files along with App.Config file

we can have multiple .config files along with App.config file but we use only App.Config File
Why is DataSet slower than DataReader

As Dataset carry considerable overhead because of relations,multiple
tables etc., speed is slower than "DataReader".Always try to use
"DataReader" wherever possible, as it is meant especially for speed
performance.
What is the wildcard character in SQL

Let’s say you want to query database with LIKE for all employees whose name
starts with La. The wildcard character is %, the proper query with LIKE
would involve ‘La%’.
Explain ACID rule of thumb for transactions.

A transaction must be:
1.Atomic - it is one unit of work and does not dependent on
previous and following transactions.
2.Consistent - data is either committed or roll back, no
“in-between” case where something has been updated and something hasn’t.
3.Isolated - no transaction sees the intermediate results of the
current transaction).
4.Durable - the values persist if the data had been committed
even if the system crashes right after.

More C# Interview Questions & Answers here

Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Exclusive Interview Questions and Answers Categories