Dotnet Interview questions and FAQs, Jobs

  • Thread starter Thread starter anil reddy
  • Start date Start date
Say we have a TextBox and Button control in one user control and we have
another TextBox in .aspx Page in wich we have placed that User Control. And
now If the user enters any text in User Control Text and clicks on Button in
User Control, that text should be displayed in .aspx page TextBox by calling
a method in page on User Control button click.
<<<

I had to read this about 3 times. You should make the control in the page a
label so that when you say "TextBox" I don't have to double-check which
TextBox you mean.


How to create DataBase tables schema diagram using SQL Server Management
Studio?
<<<

You expect me to remember each GUI step involved? This kind of task is more
of a visually intuitive thing than a memory thing, so asking someone to
remember how to do it isn't a very good question.


Difference between scripting language and a programming language?
<<<

Just not sure this is of any use at all.



I am stopping now. These look more like a FAQ than interview questions.
 
Here are some things I usually ask in an interview:

1. Write a stack container class.
2. Write a method to count the set bits in an integer.
3. Explain the difference between virtual, override, and overload.
4. Explain pass by value vs. pass by reference.
5. Explain synchronization vs. atomic code.
6. Where would you use synchronization in a .Net application?
7. Why are you interested in working here?
8. What's wrong with your previous/current job?
 
Good questions.
The only hard and annoying one, which I really hate, is the last one :))

If I would be an interviewer, beside the necessary technical background I
would also ask the interviewee to tell how he would approach a task
involving a new technology which he has not worked with, what are the steps
he follows.
In my opinion, beside the technical stuff, this is uber-important which many
people overlook.
..
 
1. Write a stack container class.

would this count?

2. Write a method to count the set bits in an integer.

hehe :-)

3. Explain the difference between virtual, override, and overload.

I remember a Delphi interview where I was asked to explain the difference
between private, protected, public, and published. He disagreed with my
description of private (which in Delphi is more like "internal"), but he
later did a test and found out I was right. It was nice to teach the
programmer something new in the interview :-)
4. Explain pass by value vs. pass by reference.
5. Explain synchronization vs. atomic code.

This doesn't mean anything to me.
6. Where would you use synchronization in a .Net application?

I don't understand what you mean by synchronization.
 
anil reddy said:

* How to create DataBase tables schema diagram using SQL Server
Management Studio?

The only right answer can be: Never. :)

* Difference between scripting language and a programming language?

I think your answer is getting this completly wrong. First of all
important scripting languages like DOS, Shell-Script languages (sh,
bash, tcsh,...), Perl, Python etc. are missing. Secondly, as the
extended examples show, these language don't have to be embedded in
anything -- BTW PHP may also be used to write standalone applications
without embedding anything in HTML. And don't forget that for example
C interpreters are available and Java and C# are also mostly
interpreted (compiled to byte code which then is interpreted, much
like systems that are today available for PHP, Perl, Python etc).

The term 'scripting language' says something about the roots and maybe
about the primary design goals of a language, but nothing about its
performance, if its interpreted or compiled (or a mix) etc.
 
4. Explain pass by value vs. pass by reference.
This doesn't mean anything to me.

I could rephrase the questions a bit:

4. Explain the difference in behavior with structs and classes in C#
including passing those into methods.
5. Explain the lock keyword in C#. Does using the lock keyword cause
the code inside it to run atomically?
 
4. Explain the difference in behavior with structs and classes in C#
including passing those into methods.

So your question is really

4. Explain the difference between reference types and value types.

I say this because I read "pass by value" as this

public void DoSomething(string passedByValue)
{
}

and "pass by reference" as this

public void DoSomething(ref string passedByReference)
{
}

Simply because you used the words "pass by", which implies a method call.


5. Explain the lock keyword in C#. Does using the lock keyword cause
the code inside it to run atomically?

I think the first part of the question is sufficient.

"Explain what the lock keyword in C# is used for". The second part of your
question is more of a clue. The answer to the second part of your question
is "Yes". The code within a lock statement will always run "automatically"
in so far as you don't need to tell it to run, however it wont run
"immediately" and may not run at all :-)
 
5. Explain the lock keyword in C#. Does using the lock keyword cause
the code inside it to run atomically?

Strictly speaking the answer is no isn't it? In C# a statement is atomic if
it executes as a single indivisible instruction. Strict atomicity precludes
any possibility of preemption. In C#, a simple read or assignment on a
field of 32 bits or less is atomic (assuming a 32-bit CPU). Operations on
larger fields are non-atomic, as are statements that combine more than one
read/write operation.
 
The code within a lock statement will always run "automatically" ...

Uh, there's a big difference between "automatic" and "atomic". The
latter implies the code all runs uninterrupted, which you can never
guarantee in .Net.
 
Back
Top