Simple interview questions on Microsoft .NET

  1. What is the base class of .NET?
  2. Explain assemblies.
  3. Name some of the languages .NET support?
  4. ADO.NET features? Benefits? Drawbacks?
  5. How many types of exception handlers are there in .NET?
  6. Difference between Panel and GroupBox classes?
  7. What is the base class of Button control?
  8. What is Response object? How is it related to ASP’s Response object?
  9. What is IIS? Have you used it?
  10. Main differences between ASP and ASP.NET.
This entry was posted in .NET, Web dev. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

100 Comments on Simple interview questions on Microsoft .NET

  1. Mickey Perlstein
    Posted 12/18/2005 at 12:42 pm | Permalink

    What is Delegate and what is it used for ?,293823,sid8_gci916799_tax293034,00.html

    Delegate is kinda like a pointer to a function in C++ or like an event handler in Java

    You can use it to “multicast” which means running multiple functions in different instances of object already created.

    This is useful when you want your objects to “register” to an event raised by another object.

    The way it works is the object you are registered to listen to recieves the delegate of the function it is supposed to run in your object, the delegate is then run from it. (if you switch the word delegate for pointer, this would be much simpler)

    Read the enclosed URL

  2. Suneel Dath
    Posted 1/10/2006 at 10:08 am | Permalink

    Dear Deepti,

    XML can have objects as its parameter values, as they can be serialized and sent for transmission. U better check out for the XML documentation where u can specify the type of data as object which can be used for ur e-mail resume objects. remember u can’t convert the resume to xml format, but as an object of richtext format etc. try out.

  3. Maruti Tathe
    Posted 2/13/2006 at 1:49 am | Permalink

    Dear Mr. Ashraf ASP.NET code is half compiled, only CODE BEHIND part of the scripting is compiled in ASP.NET. I think we can defferntiate between ASP and ASP.NET as follows…

    1) Half (CodeBehind) compiled. ***
    2) Multiple language support. ***
    3) Robust ***
    4) Predefined components i.e. ASP.NET components are precoded user have to just drag and drop on the form.
    5) Better IDE that helps to create WYSIWYG applications very fast.
    6) Standard validation controls
    etc etc

  4. Jayender
    Posted 4/11/2006 at 11:15 pm | Permalink

    what are assemblies in .Net :
    In the Microsoft .NET framework an assembly is a partially compiled code library for use in deployment, versioning and security. In the Microsoft Windows implementation of .NET, an assembly is a PE (portable executable) file. There are two types, process assemblies (EXE) and library assemblies (DLL). A process assembly represents a process which will use classes defined in library assemblies. In version 1.1 of the CLR classes can only be exported from library assemblies; in version 2.0 this restriction is relaxed. The compiler will have a switch to determine if the assembly is a process or library and will set a flag in the PE file. .NET does not use the extension to determine if the file is a process or library. This means that a library may have either .dll or .exe as its extension.

    The code in an assembly is partially compiled into CIL, which is then fully compiled into machine language at runtime by the CLR.

    An assembly can consist of one or more files. Code files are called modules. An assembly can contain more than one code module and since it is possible to use different languages to create code modules this means that it is technically possible to use several different languages to create an assembly. In practice this rarely happens, principally because Visual Studio only allows developers to create assemblies that consist of a single code module.

  5. Jayender
    Posted 4/11/2006 at 11:19 pm | Permalink

    Difference between Panel and GroupBox classes?

    Panel is scrollable. In panel you can’t set caption like Group box.

  6. Jayender
    Posted 4/11/2006 at 11:47 pm | Permalink

    Check this:
    to know about Exception Handling

  7. Jayender
    Posted 4/12/2006 at 12:21 am | Permalink

    Read this article to find out the differences between ASP.NET and ASP.
    It clearly explains the differences from programmers stand point.


  8. Jayender
    Posted 4/12/2006 at 12:45 am | Permalink

    what is the CLR? Question by Geetha

    The .NET Framework provides a runtime environment which runs the code and provides services that make the development process easier. This runtime environment in .NET Framework is known as Common Language Runtime (CLR). The CLR sits at the very heart of managed code. Common Language Runtime is the generalized multi-language, reflective execution engine on which code originally written in various languages runs. At a higher level, CLR is simply an engine that takes in Intermediate Language (IL) instructions, translates them into machine instructions, and executes them. Although the common language runtime provides many standard runtime services, managed code is never interpreted. A feature called just-in-time (JIT) compiling enables all managed code to run in the native machine language of the system on which it is executing. The CLR shares much in common with a traditional operating system.

    Managed code is the term used for any code that is running on .NET Framework.

    The CLR provides the infrastructure that enables managed code to execute as well provides variety of services during execution. When a method, for which IL has been generated, is called for the first time the CLR compiles the IL into native code that is specific to the processor the Environment it is running on (This process is known as Just in Time Compilation or JIT). If the same method is called next time, the existing JIT compiled code is reused. During execution managed code receives variety of services from the runtime environment.

    When compiling to managed code, the compiler translates your source code into Microsoft intermediate language (MSIL), which is a CPU-independent set of instructions that can be efficiently converted to native code. Intermediate Language is a binary assembly language that is compiled at runtime down to whatever machine language is appropriate for the host CPU. This runtime compilation is called Just-In-Time Compiling or JIT-compiling.

    Advantages of Managed Execution Environments

    In unmanaged environments the compiler and linker directly compile the source code in to native instructions that are targeted at a specific processor. The disadvantage of this process is that each time you want to run your executable on a different platform you will have to re-compile the code using a compiler and linker that will compile the code that is targeted at the specific hardware. This means that each time you want your application to run on a different platform, you will have to ship the compiled instructions again and again. As this leads to compiling and maintaining multiple versions of the same application, the companies try to create a more generalized compiled version in order to target most of the environments. This process is known as the Lowest Common Denominator approach. This leads to a more generalized program which is not optimized properly and does not take advantages of the underlying hardware infrastructure (processor, cache, etc). Because the CLR supplies one or more Just in Time Compiler for each computer architecture it supports, the same set of MSIL can be JIT-compiled and run on any supported architecture. This

    CLR provides the following benefits for developers:

    Vastly simplified development.
    Seamless integration of code written in various languages.
    Evidence-based security with code identity.
    Assembly-based deployment that eliminates DLL Hell.
    Side-by-side versioning of reusable components.
    Code reuse through implementation inheritance.
    Automatic object lifetime management.
    Code access security.
    Cross Language Integration.
    Self describing objects.
    The CLR automatically handles object layout and manages references to objects, releasing them when they are no longer being used. This automatic memory management resolves the two most common application errors, memory leaks and invalid memory references. This process is known as Garbage Collection. The CLR also manages thread execution, code execution, code safety verification, compilation, and other system services.

    The CLR is designed for the software of the future, and it also supports software of today and yesterday. Interoperability between managed and unmanaged code provided by CLR helps developers continue to use necessary COM components and DLLs.


  9. Jayender
    Posted 4/12/2006 at 12:51 am | Permalink

    1.what is a component ?Question by anwarullah
    Do u mean COM ? if so .. check this :

    2.How is meant by DLL ? Question by anwarullah

    A DLL (Dynamic Link Library) is a file that can be loaded and executed by programs dynamically. Basically it’s an external code repository for programs. Since usually several different programs reuse the same DLL instead of having that code in their own file, this dramatically reduces required storage space. A synonym for a DLL would be library.


  10. Jayender
    Posted 4/12/2006 at 12:53 am | Permalink

    Which DLL translate XML to SQL in IIS? Question by srinivasa rao T

    Answer : Sqlisapi.dll


  11. Jayender
    Posted 4/12/2006 at 1:01 am | Permalink

    Can anyone tell me about Secure Socket Layer? How to make use of the technology? Question by Harshad

    Secure Sockets Layer (SSL) and Transport Layer Security (TLS), its successor, are cryptographic protocols which provide secure communications on the Internet. There are slight differences between SSL 3.0 and TLS 1.0, but the protocol remains substantially the same. The term “SSL” as used here applies to both protocols unless clarified by context.

    Check out this:

  12. Jayender
    Posted 4/12/2006 at 4:11 am | Permalink

    Can i get brief explanation about threading in C# Question by Venkata Nageswara Rao

    Check this:
    to know better about threading.


  13. Jayender
    Posted 4/12/2006 at 4:15 am | Permalink

    What is the Differnce Between Response.write & response.output.Write Question by Vishal

    In ASP.NET the Response object is of type HttpResponse and when you say Response.Write you’re really saying (basically) HttpContext.Current.Response.Write and calling one of the many overloaded Write methods of HttpResponse.

    Response.Write then calls .Write() on it’s internal TextWriter object:

    public void Write(object obj){ this._writer.Write(obj);}

    HttpResponse also has a Property called Output that is of type, yes, TextWriter, so:

    public TextWriter get_Output(){ return this._writer; }

    Which means you can to the Response whatever a TextWriter will let you. Now, TextWriters support a Write() method ala String.Format, so you can do this:

    Response.Output.Write(”Scott is {0} at {1:d}”, “cool”,DateTime.Now);

    But internally, of course, this this is happening:

    public virtual void Write(string format, params object[] arg)
    this.Write(string.Format(format, arg));


  14. ricky tp
    Posted 7/12/2006 at 12:21 am | Permalink

    cud u please tell me in brief but a more understandable way about the difference between response.write() and response.output.write()??

  15. viral
    Posted 7/13/2006 at 2:20 am | Permalink

    Which dll is required to translate XML to SQL in IIS ?


  16. snathanam
    Posted 7/18/2006 at 5:42 am | Permalink

    Is there any diff between
    dim x,y as integer
    dim x as integer,dim y as integer.

  17. Posted 7/27/2006 at 4:42 am | Permalink


    If we delete web.config and machine.config then our application will work or not.

    Plz Reply.

  18. Madhu Venugopal
    Posted 9/6/2006 at 3:47 am | Permalink

    Is there any diff between
    dim x,y as integer
    dim x as integer,dim y as integer.

    Well, in vb6, the declaration would make: x - object and y - integer, .NET overcomes this and makes 2 integer vars : x and y

  19. Sarfaraz
    Posted 9/17/2006 at 12:14 pm | Permalink

    Q1. How we create menu in
    Q2. How we create user control

  20. Posted 9/18/2006 at 5:57 am | Permalink

    1. Main differences between ASP and ASP.NET

    a) is compiled but ASP is a interpretor or script only.
    b) is supported more control then the asp.
    c) is more supported even control then the asp.
    d) In if update any component then no need to shutdown the computer but in asp if loaded any component then need tobe shutdown the computer.
    d) So lastly an is faster then asp .

  21. jyothi
    Posted 9/25/2006 at 4:54 am | Permalink

    Q1. How we create menu in
    Q2. How we create user control

    Tech Interviews comment by Sarfaraz

  22. Nagaraja
    Posted 10/22/2006 at 6:22 am | Permalink

    Some of the languages that .NET support
    ASP.NET is not a language
    It is Specification only

  23. Nagaraja
    Posted 10/22/2006 at 7:33 am | Permalink

    ADO.NET Features
    ADO.NET Does Not Depend On Continuously Live
    Database Interactions Are Performed Using Data
    Data Can Be Cached in Datasets
    Datasets Are Independent of Data Sources
    Data Is Persisted as XML
    Schemas Define Data Structures

  24. Nagaraja
    Posted 10/22/2006 at 7:50 am | Permalink

    ASP (Classic ASP as it is known) is a Script Language (i.e VBScript),
    ASP.NET is a the web formulation of a Compiled Language (i.e. Visual Basic, C#, J#, C++.Net)
    ASP is mostly written using VB Script and HTML intermixed. Presentation and business logic is intermixed while ASP.NET can be writen in several .NET compliant languages like C#, VB.NET and business logic can be clearly separated from Presentation logic.
    ASP had maximum of 4 built in classes like Request, Response, Session and Application whereas ASP.NET using .NET framework classes which has more than 2000 in built classes.
    ASP does not have any server based components whereas ASP.NET offers several server based components like Button, TextBox etc and event driven processing can be done at server.
    ASP did not support Page level transactions whereas ASP.NET supports Page level transactions.

  25. Nagaraja
    Posted 10/22/2006 at 8:03 am | Permalink

    Exception Handling: There are two types of Exception Handling techniques.
    1.Structured Exception Handling:-Structured Exception Handling involves the use of the Try…Catch…Finally statement within the code to handle errors in a program. The syntax of this statement is

    The statements that might generate an error
    End Try

    Unstructured Exception Handling:- Unstructured exception handling involves the use of teh On Error statement to handle errors. You Specify the line number or label as an argument to this statement.
    We can use two forms of the On Error Statement.
    These are
    1.The On Error GoTo Line Statement
    2.The On Error Resume Next Statement

  26. Amit Dube
    Posted 11/13/2006 at 6:01 am | Permalink

    What is the base class of .NET?

    System is the base class of .NET.

  27. Amit Dube
    Posted 11/13/2006 at 6:18 am | Permalink

    Que.Explain assemblies
    Ans.It is a primary building block of .NET.
    It is reusable,self-describing and versionable deployment unit for types and resources.
    Que.Name some of the languages .NET support?
    VB.NET,Visual C#,Visual C++
    Que.What is IIS? Have you used it?
    Ans.IIS stands for Internet Information Server.Basically IIS is an engine that drives ASP.NET websites.
    Que.Main differences between ASP and ASP.NET
    Ans.ASP is interpretted wheile ASP.NET is compiled.

  28. kavitha reddy
    Posted 11/16/2006 at 1:26 am | Permalink

    If you delete the web.config and machine.config files the application surely won’t work.

  29. Vruddhi Vasoo
    Posted 12/1/2006 at 2:58 am | Permalink

    What is the difference between Response.Write() and Console.WriteLine()?

  30. Azeem Fraz
    Posted 12/15/2006 at 2:27 am | Permalink

    Amit Dube, System is not a class, its a namespace. Base class for .net is System.Object i think.

  31. Sikkandar Basha
    Posted 2/20/2007 at 11:32 am | Permalink

    What is the Difference B/W Repeater Control and Datagrid?
    Can anyone give me the Answer

  32. Maheswarn
    Posted 2/28/2007 at 6:03 am | Permalink

    What is static method and dynamic method in c#?

  33. Thiruvarasamurthy
    Posted 4/12/2007 at 3:06 pm | Permalink

    Hello geetha,

    Q)What is CLR?

    Short Answer:

    CLR-Common Language Runtime.
    It is the Runtime environment for the .NET application.


    It is developed for .NET product, also it is a part of
    .Ner Framework.

    We see you write any program in any language(some except)and after create the EXE, If you run that EXE program need some supporting environments that is called as Runtime environment.

    I give some examples :

    1)JAVA needs JRE(Jave Runtime Environment).

    2)VB needs VBRUN and msvbvm60.dll.

    3).NET needs CLR.

    If your program run on other computer you must install
    the particular Runtime Environment.

    Note: .NET Framework contain the CLR. so when u install the .NET Framework also installed the CLR.
    So u run the .NET program,

    Your .NET Program + .Net Framework(CLR)=Successfully run on target computer.

  34. thiruvarasamurthy (TVM)
    Posted 4/14/2007 at 3:36 am | Permalink

    Hello vijai,

    Q) what is diff between Compiler and RuntimeEnvironment?

    The work compiler convert the source code to machine code according to the Language.

    For example, u wirte the program in vb,when u execute the program first compiled and executed ur program.
    Then u get the EXE program.

    After the compile ,when run the ur EXE program, now need some supporting environment. that is called Runtime Environment.

    Creating computer+ vb(compiler) +Runtime Environment+ ur vb program=Run.

    Target computer+ ur EXE program+ Runtime Environment=Run.

    ok by,

  35. bala
    Posted 4/29/2007 at 6:46 am | Permalink

    what are the main objects of c#?

  36. bala
    Posted 4/29/2007 at 6:57 am | Permalink

    1.Converting an object to xml is called serialization.

    2.main purpose of delegates is create events. default in parameters are value type.if any changes make to the parameters with in the procedure willnot reflect the arguments passed to them.i.e called value type parameters.

    i will tell you later.

  37. Azhagia Manavalan
    Posted 5/10/2007 at 10:00 am | Permalink

    What is session? what are their types? Explain?

  38. Azhagia Manavalan
    Posted 5/10/2007 at 10:01 am | Permalink

    What is querystring? their types? explain?

  39. Azhagia Manavalan
    Posted 5/10/2007 at 10:02 am | Permalink

    what is the difference between panel and placeholder?

  40. Srinivas pattem
    Posted 6/16/2007 at 11:27 am | Permalink

    What is the difference between TRUNCATE and DELETE?

  41. Namadev
    Posted 8/7/2007 at 1:58 am | Permalink

    Is there any diff between
    dim x,y as integer
    dim x as integer,dim y as integer.

    There is no such difference as compared to time taken for writing the code

  42. Namadev
    Posted 8/7/2007 at 2:04 am | Permalink

    Hi thiruvarasamurthy (TVM),

    Basically a compiler compiles the source code to MSIL, which is code that can be understood by the CLR, which indeed is known as virtual machine. Now when you execute the exe , the MSIL code is translated to machine code , and run.

  43. Balaji.b
    Posted 8/27/2007 at 3:37 pm | Permalink

    What is the difference between TRUNCATE and DELETE?

    In delete statement we can use where class,but we cant use where class Truncate class

    Truncated memory reallacation is loged

  44. Lalit kumar
    Posted 9/17/2007 at 4:58 am | Permalink


  45. Riddhi
    Posted 9/20/2007 at 3:31 am | Permalink

    can a asp .net web page be able to run on the linux system? if yes why if no why? plz reply…i was asked it in last interview..

  46. Amit Dube
    Posted 2/29/2008 at 9:55 am | Permalink

    Que: What is the base class of .NET?
    Ans: System.Object is the base class of .NET

  47. Amit Dube
    Posted 2/29/2008 at 9:59 am | Permalink

    Que: Explain assemblies

    Ans: Assembly is a primary building block of .NET. Components written in IL and execute by the runtime is called .NET Managed Assemble in short Assembly. It is reusable,self describing and versionable deployment unit for types and resources.

  48. Posted 2/29/2008 at 10:36 am | Permalink

    Diff between the WebFarm and webgarden

  49. sudhakaran
    Posted 4/12/2008 at 12:36 pm | Permalink

    That’s a good question, it’s actually the terminology.

    Web farm is basically a load balancing environment where multiple Web
    servers are hosting the same Web site.

    Web garden, if you have a box with multiple processors, that’s what it is
    called, Web garden, so that’s the terminology.

    Therefore : A Web garden is similar in nature to a Web farm, the difference
    being that a Web garden exists within a single server.

  50. Dhiraj Kumar
    Posted 7/29/2008 at 1:56 am | Permalink

    The main difference between Truncate and Delete is that…Delete is used to delete the rows with some condition provided with the statement(i.e. after using Delete command the rows which satisfies the condition will be deleted from the memory)…and Truncate command is used to delete all existing rows from the table(after using Truncate command the table will remain there with the same structure…but all the rows of the table will be deleted)

Post a Comment

Your email is never published nor shared. Required fields are marked *