Get benefited from interview Q/A and Online Test section. Subscribe to this blog to get updates directly in your mail box.
Best View in Google Crome, Mozilla firefox or IE 7 or above
Showing posts with label Dotnet Interview Question. Show all posts
Showing posts with label Dotnet Interview Question. Show all posts

Saturday, October 11, 2014

Good books on ADO.Net

I frequently get emails asking suggestion on good books on ADO.Net.
Here are few good books on ADO.Net for your reference.

1.  Microsoft ADO.NET 4 Step by Step (Step by Step (Microsoft)) 

2. Murach's ADO.NET 4 Database Programming with C# 2010 
(Murach: Training & Reference) 

3. ADO.NET 3.5 Cookbook (Cookbooks (O'Reilly)) 

4. A Programmer's Guide to ADO.NET in C sharp (Expert's Voice)

Sunday, April 6, 2014

Difference between constructor and method in c#

This is a very basic question mainly asked in Beginner level interviews (1 to 2 years of experience).
The interviewer can twist the question as below as well.


  • Difference between method and constructor in c#
  • Difference between constructor and method in dotnet with example
  • Difference between methods and constructors in object oriented programming


Answer:

Here are few differences between Constructor and methods in bullet points.


Constructor:
1. Name of constructor should be same as class name
2. Constructor is used to initialize class members (variables). It is used to create an instance of  a class.
3. Returns nothing. Hence no return type.
4. Called implicitly at the time of object creation


Method:
1. Name is independent from class name
2. Method is having some functionality. It is used to perform some operations.
3. Must return something. If nothing to return, explicitly return type should be void.
4. Need to be called explicitly


Tuesday, February 12, 2013

What are the commonly used classes in System.Data.SqlClient?



Here are the commonly used classes in System.Data.SqlClient:

SqlCommand:
Represents a Transact-SQL statement or stored procedure to execute against a SQL Server database.

SqlCommandBuilder:
Automatically generates single-table commands used to reconcile changes made to a DataSet with the associated SQL Server database.

SqlConnection:
Represents an open connection to a SQL Server database.

SqlDataAdapter:
Represents a set of data commands and a database connection that are used to fill the DataSet and update a SQL Server database.

SqlDataReader:
Provides a means of reading a forward-only stream of rows from a SQL Server database.

SqlTransaction:
Represents a Transact-SQL transaction to be made in a SQL Server database.

For more ADO.Net Interview Questions, click here.




What is the Namespace for using SQL Server database in Dotnet Application?

System.Data.SqlClient namespace is the .NET Framework Data Provider for SQL Server.

The .NET Framework Data Provider for SQL Server describes a collection of classes used to access a SQL Server database in the managed space. Using the SqlDataAdapter, you can fill a memory-resident DataSet, which you can use to query and update the database.

For the commonly used classes in System.Data.SqlClient, click here.

For more ADO.Net Interview Questions, click here.

Sunday, July 24, 2011

Dotnet Interview Questions for 1 year experience

Here are few basic dotnet interview questions asked in interview for a 1 year experience candidate.

About your project:

Get maximum knowledge about your current project. You should know the architecture diagram of your project. Also, you have to explain the Dataflow. You might be asked to tell what all dotnet new features used in your project.

Then follows technical discussion.

Dotnet Framework Interview Questions for 1 Year Experience:

1. What is CLR and it's functions?
2. How memory is managed in Dotnet applications?
Hint: Automatically by Garbage collector
3. What is an assembly?
4. What is a strong name?
5. What is MSIL?

C# Interview Questions for 1 Year Experience:

1. What are the 4 pillars of Object Oriented Programming?
2. What is a Class? What is an Object?
3. What is a partial class?
4. What is a sealed class?
5. What is constructor?
6. What is stringbuilder?

ADO.Net Interview Questions for 1 Year Experience:

1. What is connection string?
2. What is Datareader?
3. Difference between Dataset and datareader?
4. What is Ado.Net?
5. Namespace for using sqlserver database?

ASP.Net Interview Questions for 1 Year Experience:

1. What is web.config file and it's use?
2. What is global.asax?
3. What is session?
4. Which all controls you have used in your project?
5. What is gridview?
6. What is Authentication in ASP.Net and types of authentication?

SQL Server Interview Questions for 1 Year Experience:

1. What is Primary key, unique key and difference between them?
2. What is index? Types of index?
3. What is a stored procedure? Why it is better than inline query?
Hint: Stored Procedure is precompiles and has a execution plan. Hence faster execution.
4. You might be asked to write simple query
5. What is inner join

Also, if you know any advance concepts like WCF, WPF, LINQ, MVC, JQuerymention while telling "about yourself". You will be given preference. But, make sure you know the basics or worked on them for sometime.

Post questions you faced in interview in comments. Also post answers in comments to questions mentioned above.

Wednesday, March 30, 2011

Interview Question on Inheritance and Default Constructor

Here is a question on OOPS concepts like Inheritance and Default Constructor. The code provided is in C#.

There are three classes named A, B and C.
Class A has a default constructor that writes "In A" to console. Similarly Class B and C has default constructors that write "In B", and "In C" to Console respectively.
Class C inherits from Class B and Class B inherits from class A.

[Code]
class A
{
public A()
{
Console.WriteLine("In A");
}
}

class B:A
{
public B()
{
Console.WriteLine("In B");
}
}

class C:B
{
public C()
{
Console.WriteLine("In C");
}
}

[/Code]

Now, the question is as below.
If we instanciate class C, what will be the output.

[Code]
static void Main(string[] args)
{
C objC = new C();
Console.Read();
}

[/Code]

Result:
The result will be:
In A
In B
In C

Thursday, October 7, 2010

Is XML case sensitive?

Yes, XML tags are case sensitive. The tag <Employee> is different from the tag <employee>.

Opening and closing tags must be written with the same case:

<Message>This is incorrect</message>

<message>This is correct</message>

  © Blogger templates Shiny by Ourblogtemplates.com 2008

Back to TOP