<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7468658770095272063</id><updated>2011-07-30T21:15:49.093-07:00</updated><category term='net faqs 4'/><category term='dotnet faqs 6'/><category term='dotnet faqs 8'/><category term='dotnet faqs 5'/><category term='dotnet faqs 1'/><category term='net faqs 1'/><category term='dotnet faqs 4'/><category term='Dotnet faqs'/><category term='net faqs 2'/><category term='Dotnet Tutorials'/><category term='dotnet faqs 2'/><category term='dotnet faqs 3'/><category term='net faqs 3'/><category term='dotnet faqs 7'/><title type='text'>.NET INTERVIEW QUESTIONS AND ANSWERS</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dotnet786.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dotnet786.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>prashanth</name><uri>http://www.blogger.com/profile/07711599595106933499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7468658770095272063.post-3075836454837126063</id><published>2007-05-31T12:41:00.001-07:00</published><updated>2010-04-20T07:38:47.884-07:00</updated><title type='text'></title><content type='html'>&lt;span style="font-size: 85%;"&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-size: 180%;"&gt;&lt;a href="http://www.blogger.com/goog_26666086"&gt;Download Free 320kbps Songs&lt;/a&gt;&lt;/span&gt;&lt;a href="http://www.blogger.com/goog_26666086"&gt;&lt;br /&gt;&lt;/a&gt; &lt;span style="font-size: 100%;"&gt;&lt;span style="font-size: 130%;"&gt;&lt;a href="http://freshduniya.blogspot.com/"&gt;Free 320kbps Hindi And Telugu Songs Download&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 180%;"&gt;&lt;span style="color: black;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-size: 180%;"&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;Earn Money Through SMS&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 130%;"&gt;&lt;a href="http://www.mginger.com/index.jsp?inviteId=194465"&gt;Sign Up Here&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7468658770095272063-3075836454837126063?l=dotnet786.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnet786.blogspot.com/feeds/3075836454837126063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7468658770095272063&amp;postID=3075836454837126063' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/3075836454837126063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/3075836454837126063'/><link rel='alternate' type='text/html' href='http://dotnet786.blogspot.com/2007/05/download-free-320kbps-songs-free.html' title=''/><author><name>prashanth</name><uri>http://www.blogger.com/profile/07711599595106933499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7468658770095272063.post-201295440006638431</id><published>2007-05-30T12:37:00.000-07:00</published><updated>2007-05-30T12:38:38.587-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dotnet Tutorials'/><title type='text'>Dotnet Tutorials</title><content type='html'>Here are 29 books, tutorials, and chapters for learning about developing applications using the .Net (DotNET) Framework using C# (C Sharp), Visual Basic .NET, and ASP .NET. These learning and training materials are from many different web resources, and give you a great start or refresher in these Microsoft development technologies. All of these are in pdf format.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;DotNET Progamming Books and Tutorials&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://dotnet.jku.at/courses/tutorial/01.Overview.pdf"&gt;An Overview of the .NET Technology&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.ieice.or.jp/iss/de/DEWS/proc/2002/tutorial/dotNET.pdf"&gt;DotNET Tutorial&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.theserverside.com/articles/pdf/J2EE-vs-DotNET.pdf"&gt;J2EE vs. Microsoft .NET&lt;/a&gt;&lt;br /&gt;&lt;a href="http://support.businessobjects.com/communitycs/filesandupdates/sample_applications_for_.NET_developers.pdf"&gt;Sample Applications for .NET developers&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.cs.yorku.ca/eiffel/dotnet/DotNet-XML-tutorial.pdf"&gt;Eiffel .Net (DotNet-XML-tutorial)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.coresecurity.com/files/files/12/dotnet-security-framework.pdf"&gt;Security in the Microsoft .NET Framework&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C# Progamming Books and Tutorials&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/net/ecma/WD05-Review.pdf"&gt;C# Language Specification&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.apress.com/ApressCorporate/supplement/1/83/1893115623-454.pdf"&gt;A Programmer’s Introduction to C#, Second Edition&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.cs.umd.edu/%7Ebederson/classes/dui/lecture-notes/csharp.pdf"&gt;C# for Programmers&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.ecma-international.org/activities/Languages/Introduction%20to%20Csharp.pdf"&gt;Basic Introduction to C#&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.kbcafe.com/articles/HowTo.Thread.CSharp.I.pdf"&gt;C SharpThreading, Part I Intermediate Level Creating Threads &lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.kbcafe.com/articles/HowTo.Thread.CSharp.II.pdf"&gt;C Sharp Threading, Part II Intermediate Level &lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.ncst.ernet.in/education/apgdst/comfac/lecture/CSharpProgramming.pdf"&gt;What is C# and Basic Requirements for C#&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.ssw.uni-linz.ac.at/Teaching/Lectures/CSharp/Tutorial/Part1.pdf"&gt;Introduction to C#&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.ssw.uni-linz.ac.at/Teaching/Lectures/CSharp/Tutorial/Part2.pdf"&gt;Advanced C#&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.willydev.net/descargas/CLICsharp.pdf"&gt;Detailed C# Language Specification&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.perfectxml.com/Conf/Wrox/Files/burt_csharp.pdf"&gt;Sharpen Up on C#&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.perfectxml.com/sybex/Files/ADONET.PDF"&gt;Visual C# .NET Developer's Handbook&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.programmersheaven.com/other/BookSamples/pdf/custom%20controls.pdf"&gt;User Interfaces in C#: Windows Forms and Custom Controls &lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.c-sharpcorner.com/FreeChapters/APress/1893115593.pdf"&gt;Chapter 5: Advanced Class Design&lt;/a&gt;&lt;br /&gt;&lt;a href="http://dotnet.zcu.cz/NET_2004/Papers/C53.pdf"&gt;Active C# &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Visual Basic .Net Progamming Books and Tutorials&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://www.webucator.com/PDFs/VBN051.pdf"&gt;Visual Basic .NET Essentials For Experienced Programmers&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.sitepoint.com/books/aspnet1/aspnet-sample.pdf"&gt;Build Your Own ASP .NET Website Using C# &amp;amp; VB .NET &lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.objectclub.jp/community/codingstandard/CodingStdVB.pdf"&gt;VB .NET coding standard&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.develop.com/conferences/conferencedotnet/materials/M1.pdf"&gt;Migrating from COM and VB6 to VB .NET&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ASP .NET Progamming Books and Tutorials&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://www4.dogus.edu.tr/bim/bil_kay/prog_dil/asp.net/aspdotnet.pdf"&gt;Introduction to ASP .NET&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.perfectxml.com/apress/ASPNETIntroduction.pdf"&gt;ASP .NET Introduction&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.dotnet.za.net/book/IntroToASP.NET.pdf"&gt;An Introduction to ASP .NET&lt;/a&gt;&lt;br /&gt;&lt;a href="http://pluralsight.com/fritz/demos/060307vb.pdf"&gt;ASP .NET Fundamentals Introduction to ASP .NET 2.0 (VB .NET)&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7468658770095272063-201295440006638431?l=dotnet786.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnet786.blogspot.com/feeds/201295440006638431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7468658770095272063&amp;postID=201295440006638431' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/201295440006638431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/201295440006638431'/><link rel='alternate' type='text/html' href='http://dotnet786.blogspot.com/2007/05/dotnet-tutorials.html' title='Dotnet Tutorials'/><author><name>prashanth</name><uri>http://www.blogger.com/profile/07711599595106933499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7468658770095272063.post-8528791183968755588</id><published>2007-05-30T11:51:00.000-07:00</published><updated>2007-05-30T11:53:21.022-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dotnet faqs'/><title type='text'>Dotnet faqs</title><content type='html'>&lt;h2&gt;&lt;a name="1."&gt;1. Introduction&lt;/a&gt;&lt;/h2&gt;   &lt;h3&gt;&lt;a name="1.1"&gt;1.1 What is .NET?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;.NET is a general-purpose software development platform, similar to Java. At its core is a virtual machine that turns intermediate language (IL) into machine code. High-level language compilers for C#, VB.NET and C++ are provided to turn source code into IL. C# is a new programming language, very similar to Java. An extensive class library is included, featuring all the functionality one might expect from a contempory development platform - windows GUI development (Windows Forms), database access (ADO.NET), web development (ASP.NET), web services, XML etc.&lt;/p&gt;&lt;p&gt;See also Microsoft's &lt;a href="http://msdn.microsoft.com/netframework/gettingstarted/default.aspx"&gt;definition&lt;/a&gt;.&lt;/p&gt;  &lt;h3&gt;&lt;a name="1.2"&gt;1.2 When was .NET announced?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Bill Gates delivered a keynote at Forum 2000, held June 22, 2000, outlining the .NET 'vision'. The July 2000 PDC had a number of sessions on .NET technology, and delegates were given CDs containing a pre-release version of the .NET framework/SDK and Visual Studio.NET.&lt;/p&gt;  &lt;h3&gt;&lt;a name="1.3"&gt;1.3 What versions of .NET are there?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;The final versions of the 1.0 SDK and runtime were made publicly available around 6pm PST on 15-Jan-2002. At the same time, the final version of Visual Studio.NET was made available to MSDN subscribers.&lt;/p&gt;&lt;p&gt;.NET 1.1 was released in April 2003, and was mostly bug fixes for 1.0.&lt;/p&gt;&lt;p&gt;.NET 2.0 was released to MSDN subscribers in late October 2005, and was officially launched in early November.&lt;br /&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="1.4"&gt;1.4 What operating systems does the .NET Framework run on?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;The runtime supports Windows Server 2003, Windows XP, Windows 2000, NT4 SP6a and Windows ME/98. Windows 95 is not supported. Some parts of the framework do not work on all platforms - for example, ASP.NET is only supported on XP and Windows 2000/2003. Windows 98/ME cannot be used for development.&lt;/p&gt;&lt;p&gt;IIS is not supported on Windows XP Home Edition, and so cannot be used to host ASP.NET. However, the &lt;a href="http://www.asp.net/"&gt;ASP.NET Web Matrix&lt;/a&gt; web server does run on XP Home.&lt;/p&gt;&lt;p&gt;The &lt;a href="http://msdn.microsoft.com/mobility/netcf/"&gt;.NET Compact Framework&lt;/a&gt; is a version of the .NET Framework for mobile devices, running Windows CE or Windows Mobile.&lt;/p&gt;&lt;p&gt;The &lt;a href="http://www.mono-project.com/"&gt;Mono&lt;/a&gt; project has a version of the .NET Framework that runs on Linux.&lt;/p&gt;  &lt;h3&gt;&lt;a name="1.5"&gt;1.5 What tools can I use to develop .NET applications?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;There are a number of tools, described here in ascending order of cost:&lt;/p&gt;&lt;ul&gt;&lt;li&gt; The &lt;a href="http://msdn.microsoft.com/netframework/"&gt;.NET Framework SDK&lt;/a&gt; is free and includes command-line compilers for C++, C#, and VB.NET and various other utilities to aid development.&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.icsharpcode.net/OpenSource/SD/Default.aspx"&gt;SharpDevelop&lt;/a&gt; is a free IDE for C# and VB.NET.&lt;/li&gt;&lt;li&gt; &lt;a href="http://msdn.microsoft.com/vstudio/express/"&gt;Microsoft Visual Studio Express&lt;/a&gt; editions are cut-down versions of Visual Studio, for hobbyist or novice developers.There are different versions for C#, VB, web development etc. Originally the plan was to charge $49, but MS has decided to offer them as free downloads instead, at least until November 2006. &lt;/li&gt;&lt;li&gt; &lt;a href="http://www.amazon.com/exec/obidos/ASIN/B000BT8TRQ/ref=nosim/andymcmullsho-20"&gt;Microsoft Visual Studio Standard 2005&lt;/a&gt; is around $300, or $200 for the &lt;a href="http://www.amazon.com/exec/obidos/ASIN/B000BT8TS0/ref=nosim/andymcmullsho-20"&gt;upgrade&lt;/a&gt;. &lt;/li&gt;&lt;li&gt; &lt;a href="http://www.amazon.com/exec/obidos/ASIN/B000BTA4LU/ref=nosim/andymcmullsho-20"&gt;Microsoft VIsual Studio Professional 2005&lt;/a&gt; is around $800, or $550 for the &lt;a href="http://www.amazon.com/exec/obidos/ASIN/B000BT8TRG/ref=nosim/andymcmullsho-20"&gt;upgrade&lt;/a&gt;. &lt;/li&gt;&lt;li&gt; At the top end of the price range are the &lt;a href="http://www.amazon.com/exec/obidos/ASIN/B000BAWKPM/ref=nosim/andymcmullsho-20"&gt;Microsoft Visual Studio Team Edition for Software Developers 2005 with MSDN Premium&lt;/a&gt; and &lt;a href="http://www.amazon.com/exec/obidos/ASIN/B000BARBAQ/ref=nosim/andymcmullsho-20"&gt;Team Suite&lt;/a&gt; editions. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;You can see the differences between the various Visual Studio versions &lt;a href="http://lab.msdn.microsoft.com/vs2005/productinfo/productline/default.aspx"&gt;here&lt;/a&gt;.                &lt;/p&gt;  &lt;h3&gt;&lt;a name="1.6"&gt;1.6 Why did they call it .NET?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;I don't know what they were thinking. They certainly weren't thinking of people using search tools. It's meaningless marketing nonsense.&lt;/p&gt;  &lt;h2&gt;&lt;a name="2."&gt;2. Terminology&lt;/a&gt;&lt;/h2&gt;   &lt;h3&gt;&lt;a name="2.1"&gt;2.1 What is the CLI? Is it the same as the CLR?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;The CLI (Common Language Infrastructure) is the definiton of the fundamentals of the .NET framework - the Common Type System (CTS), metadata, the Virtual Execution Environment (VES) and its use of intermediate language (IL), and the support of multiple programming languages via the Common Language Specification (CLS). The CLI is documented through ECMA - see &lt;a href="http://msdn.microsoft.com/net/ecma/"&gt;http://msdn.microsoft.com/net/ecma/&lt;/a&gt; for more details.&lt;/p&gt;&lt;p&gt;The CLR (Common Language Runtime) is Microsoft's primary &lt;i&gt;implementation&lt;/i&gt; of the CLI. Microsoft also have a shared source implementation known as &lt;a href="http://msdn.microsoft.com/net/sscli/"&gt;ROTOR&lt;/a&gt;, for educational purposes, as well as the &lt;a href="http://msdn.microsoft.com/mobility/netcf/"&gt;.NET Compact Framework&lt;/a&gt; for mobile devices. Non-Microsoft CLI implementations include &lt;a href="http://www.mono-project.com/"&gt;Mono&lt;/a&gt; and &lt;a href="http://www.dotgnu.org/"&gt;DotGNU Portable.NET&lt;/a&gt;.&lt;/p&gt;  &lt;h3&gt;&lt;a name="2.2"&gt;2.2 What is IL?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;IL = Intermediate Language. Also known as MSIL (Microsoft Intermediate Language) or CIL (Common Intermediate Language). All .NET source code (of any language) is compiled to IL during development. The IL is then converted to machine code at the point where the software is installed, or (more commonly) at run-time by a Just-In-Time (JIT) compiler.&lt;/p&gt;  &lt;h3&gt;&lt;a name="2.3"&gt;2.3 What is C#?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;C# is a new language designed by Microsoft to work with the .NET framework. In their "Introduction to C#" whitepaper, Microsoft describe C# as follows:&lt;/p&gt;&lt;p&gt;"C# is a simple, modern, object oriented, and type-safe programming language derived from C and C++. C# (pronounced “C sharp”) is firmly planted in the C and C++ family tree of languages, and will immediately be familiar to C and C++ programmers. C# aims to combine the high productivity of Visual Basic and the raw power of C++."&lt;/p&gt;&lt;p&gt;Substitute 'Java' for 'C#' in the quote above, and you'll see that the statement still works pretty well :-).&lt;/p&gt;&lt;p&gt;If you are a C++ programmer, you might like to check out my &lt;a href="http://www.andymcm.com/csharpfaq.htm"&gt;C# FAQ&lt;/a&gt;.&lt;/p&gt;  &lt;h3&gt;&lt;a name="2.4"&gt;2.4 What does 'managed' mean in the .NET context?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;The term 'managed' is the cause of much confusion. It is used in various places within .NET, meaning slightly different things.&lt;/p&gt;&lt;p&gt;Managed &lt;i&gt;code&lt;/i&gt;: The .NET framework provides several core run-time services to the programs that run within it - for example exception handling and security. For these services to work, the code must provide a minimum level of information to the runtime. Such code is called managed code. &lt;/p&gt;&lt;p&gt;Managed &lt;i&gt;data&lt;/i&gt;: This is data that is allocated and freed by the .NET runtime's garbage collector.&lt;/p&gt;&lt;p&gt;Managed &lt;i&gt;classes&lt;/i&gt;: This is usually referred to in the context of Managed Extensions (ME) for C++. When using ME C++, a class can be marked with the __gc keyword. As the name suggests, this means that the memory for instances of the class is managed by the garbage collector, but it also means more than that. The class becomes a fully paid-up member of the .NET community with the benefits and restrictions that brings. An example of a benefit is proper interop with classes written in other languages - for example, a managed C++ class can inherit from a VB class. An example of a restriction is that a managed class can only inherit from one base class.&lt;/p&gt;  &lt;h2&gt;&lt;a name="3."&gt;3. Assemblies&lt;/a&gt;&lt;/h2&gt;   &lt;h3&gt;&lt;a name="3.1"&gt;3.1 What is an assembly?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;An assembly is sometimes described as a logical .EXE or .DLL, and can be an &lt;i&gt;application&lt;/i&gt; (with a main entry point) or a &lt;i&gt;library&lt;/i&gt;. An assembly consists of one or more files (dlls, exes, html files etc), and represents a group of resources, type definitions, and implementations of those types. An assembly may also contain references to other assemblies. These resources, types and references are described in a block of data called a &lt;i&gt;manifest&lt;/i&gt;. The manifest is part of the assembly, thus making the assembly self-describing.&lt;/p&gt;&lt;p&gt;An important aspect of assemblies is that they are part of the identity of a type. The identity of a type is the assembly that houses it combined with the type name. This means, for example, that if assembly A exports a type called T, and assembly B exports a type called T, the .NET runtime sees these as two completely different types. Furthermore, don't get confused between assemblies and namespaces - namespaces are merely a hierarchical way of organising type names. To the runtime, type names are type names, regardless of whether namespaces are used to organise the names. It's the assembly plus the typename (regardless of whether the type name belongs to a namespace) that uniquely indentifies a type to the runtime.&lt;/p&gt;&lt;p&gt;Assemblies are also important in .NET with respect to security - many of the security restrictions are enforced at the assembly boundary.&lt;/p&gt;&lt;p&gt;Finally, assemblies are the unit of versioning in .NET - more on this below. &lt;/p&gt;  &lt;h3&gt;&lt;a name="3.2"&gt;3.2 How can I produce an assembly?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;The simplest way to produce an assembly is directly from a .NET compiler. For example, the following C# program:&lt;/p&gt;&lt;pre&gt;    public class CTest&lt;br /&gt;   {&lt;br /&gt;       public CTest() { System.Console.WriteLine( "Hello from CTest" ); }&lt;br /&gt;   }&lt;/pre&gt;&lt;p&gt;can be compiled into a library assembly (dll) like this:&lt;/p&gt;&lt;pre&gt;    csc /t:library ctest.cs&lt;/pre&gt;&lt;p&gt;You can then view the contents of the assembly by running the "IL Disassembler" tool that comes with the .NET SDK.&lt;/p&gt;&lt;p&gt;Alternatively you can compile your source into modules, and then combine the modules into an assembly using the assembly linker (al.exe). For the C# compiler, the /target:module switch is used to generate a module instead of an assembly.&lt;/p&gt;  &lt;h3&gt;&lt;a name="3.3"&gt;3.3 What is the difference between a private assembly and a shared assembly?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;The terms 'private' and 'shared' refer to how an assembly is deployed, not any intrinsic attributes of the assembly. &lt;/p&gt;&lt;p&gt;A private assembly is normally used by a single application, and is stored in the application's directory, or a sub-directory beneath. A shared assembly is intended to be used by multiple applications, and is normally stored in the global assembly cache (GAC), which is a central repository for assemblies. (A shared assembly can also be stored outside the GAC, in which case each application must be pointed to its location via a codebase entry in the application's configuration file.) The main advantage of deploying assemblies to the GAC is that the GAC can support multiple versions of the same assembly side-by-side. &lt;/p&gt;&lt;p&gt;Assemblies deployed to the GAC must be strong-named. Outside the GAC, strong-naming is optional.&lt;/p&gt;  &lt;h3&gt;&lt;a name="3.4"&gt;3.4 How do assemblies find each other?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;By searching directory paths. There are several factors that can affect the path (such as the AppDomain host, and application configuration files), but for weakly named assemblies the search path is normally the application's directory and its sub-directories. For strongly named assemblies, the search path is the GAC followed by the private assembly path.&lt;/p&gt;  &lt;h3&gt;&lt;a name="3.5"&gt;3.5 How does assembly versioning work?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;An assembly has a version number consisting of four parts, e.g. 1.0.350.1. These are typically interpreted as Major.Minor.Build.Revision, but this is just a convention.&lt;/p&gt;&lt;p&gt;The CLR applies no version constraints on weakly named assemblies, so the assembly version has no real significance.&lt;/p&gt;&lt;p&gt;For strongly named assemblies, the version of a referenced assembly is stored in the referring assembly, and by default only this exact version will be loaded at run-time. If the exact version is not available, the referring assembly will fail to load. It is possible to override this behaviour in the config file for the referring assembly - references to a single version or a range of versions of the referenced assembly can be redirected to a specific version. For example, versions 1.0.0.0 to 2.0.0.0 can be redirected to version 3.0.125.3. However note that there is no way to specify a range of versions to be redirected &lt;i&gt;to&lt;/i&gt;. Publisher policy files offer an alternative mechanism for redirecting to a different version for assemblies deployed to the GAC - a publisher policy file allows the publisher of the assembly to redirect &lt;i&gt;all&lt;/i&gt; applications to a new version of an assembly in one operation, rather than having to modify all of the application configuration files.&lt;/p&gt;&lt;p&gt;The restrictions on version policy for strongly named assemblies can cause problems when providing patches or 'hot fixes' for individual assemblies within an application. To avoid having to deploy config file changes or publisher policy files along with the hot fix, it makes sense to reuse the same assembly version for the hot fix. If desired, the assemblies can be distinguised by altering the assembly &lt;i&gt;file&lt;/i&gt; version, which is not used at all by the CLR for applying version policy. For more discussion, see Suzanne Cook's &lt;a href="http://blogs.msdn.com/suzcook/archive/2003/05/29/57148.aspx"&gt;When to Change File/Assembly Versions&lt;/a&gt; blog entry.&lt;/p&gt;&lt;p&gt;Note that the versioning of strongly named assemblies applies whether the assemblies are deployed privately or to the GAC.&lt;/p&gt;  &lt;h3&gt;&lt;a name="3.6"&gt;3.6 How can I develop an application that automatically updates itself from the web?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;For .NET 1.x, use the &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/updater.asp"&gt;Updater Application Block&lt;/a&gt;. For .NET 2.x, use &lt;a href="http://msdn.microsoft.com/longhorn/understanding/pillars/fundamentals/default.aspx?pull=/library/en-us/dnwinforms/html/clickonce.asp"&gt;ClickOnce&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;  &lt;h2&gt;&lt;a name="4."&gt;4. Application Domains&lt;/a&gt;&lt;/h2&gt;   &lt;h3&gt;&lt;a name="4.1"&gt;4.1 What is an application domain?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;An AppDomain can be thought of as a lightweight process. Multiple AppDomains can exist inside a Win32 process. The primary purpose of the AppDomain is to isolate applications from each other, and so it is particularly useful in hosting scenarios such as ASP.NET. An AppDomain can be destroyed by the host without affecting other AppDomains in the process.&lt;/p&gt;&lt;p&gt;Win32 processes provide isolation by having distinct memory address spaces. This is effective, but expensive. The .NET runtime enforces AppDomain isolation by keeping control over the use of memory - all memory in the AppDomain is managed by the .NET runtime, so the runtime can ensure that AppDomains do not access each other's memory.&lt;/p&gt;&lt;p&gt;One non-obvious use of AppDomains is for unloading types. Currently the only way to unload a .NET type is to destroy the AppDomain it is loaded into. This is particularly useful if you create and destroy types on-the-fly via reflection.&lt;/p&gt;&lt;p&gt;Microsoft have an &lt;a href="http://www.gotdotnet.com/team/clr/AppdomainFAQ.aspx"&gt;AppDomain FAQ&lt;/a&gt;.&lt;/p&gt;  &lt;h3&gt;&lt;a name="4.2"&gt;4.2 How does an AppDomain get created?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;AppDomains are usually created by hosts. Examples of hosts are the Windows Shell, ASP.NET and IE. When you run a .NET application from the command-line, the host is the Shell. The Shell creates a new AppDomain for every application.&lt;/p&gt;&lt;p&gt;AppDomains can also be explicitly created by .NET applications. Here is a C# sample which creates an AppDomain, creates an instance of an object inside it, and then executes one of the object's methods:&lt;/p&gt;&lt;pre&gt;    using System;&lt;br /&gt;   using System.Runtime.Remoting;&lt;br /&gt;   using System.Reflection;&lt;br /&gt;&lt;br /&gt;   public class CAppDomainInfo : MarshalByRefObject&lt;br /&gt;   {&lt;br /&gt;       public string GetName() { return AppDomain.CurrentDomain.FriendlyName; }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public class App&lt;br /&gt;   {&lt;br /&gt;       public static int Main()&lt;br /&gt;       {&lt;br /&gt;           AppDomain ad = AppDomain.CreateDomain( "Andy's new domain" );&lt;br /&gt;           CAppDomainInfo adInfo = (CAppDomainInfo)ad.CreateInstanceAndUnwrap(&lt;br /&gt;               Assembly.GetCallingAssembly().GetName().Name, "CAppDomainInfo" );       &lt;br /&gt;           Console.WriteLine( "Created AppDomain name = " + adInfo.GetName() );&lt;br /&gt;           return 0;&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;h3&gt;&lt;a name="4.3"&gt;4.3 Can I write my own .NET host?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Yes. For an example of how to do this, take a look at the source for the &lt;a href="http://staff.develop.com/jasonw/clr/readme.htm"&gt;dm.net moniker&lt;/a&gt; developed by Jason Whittington and Don Box. There is also a code sample in the .NET SDK called CorHost.&lt;/p&gt;  &lt;h2&gt;&lt;a name="5."&gt;5. Garbage Collection&lt;/a&gt;&lt;/h2&gt;   &lt;h3&gt;&lt;a name="5.1"&gt;5.1 What is garbage collection?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Garbage collection is a heap-management strategy where a run-time component takes responsibility for managing the lifetime of the memory used by objects. This concept is not new to .NET - Java and many other languages/runtimes have used garbage collection for some time. &lt;/p&gt;  &lt;h3&gt;&lt;a name="5.2"&gt;5.2 Is it true that objects don't always get destroyed immediately when the last reference goes away?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Yes. The garbage collector offers no guarantees about the time when an object will be destroyed and its memory reclaimed.&lt;/p&gt;&lt;p&gt;There was an &lt;a href="http://discuss.develop.com/archives/wa.exe?A2=ind0007&amp;L=DOTNET&amp;amp;P=R24819"&gt;interesting thread&lt;/a&gt; on the DOTNET list, started by Chris Sells, about the implications of non-deterministic destruction of objects in C#. In October 2000, Microsoft's Brian Harry posted a &lt;a href="http://discuss.develop.com/archives/wa.exe?A2=ind0010A&amp;L=DOTNET&amp;amp;P=R28572"&gt;lengthy analysis&lt;/a&gt; of the problem. Chris Sells' &lt;a href="http://discuss.develop.com/archives/wa.exe?A2=ind0010C&amp;L=DOTNET&amp;amp;P=R983"&gt;response&lt;/a&gt; to Brian's posting is here.&lt;/p&gt;  &lt;h3&gt;&lt;a name="5.3"&gt;5.3 Why doesn't the .NET runtime offer deterministic destruction?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Because of the garbage collection algorithm. The .NET garbage collector works by periodically running through a list of all the objects that are currently being referenced by an application. All the objects that it doesn't find during this search are ready to be destroyed and the memory reclaimed. The implication of this algorithm is that the runtime doesn't get notified immediately when the final reference on an object goes away - it only finds out during the next 'sweep' of the heap.&lt;/p&gt;&lt;p&gt;Futhermore, this type of algorithm works best by performing the garbage collection sweep as rarely as possible. Normally heap exhaustion is the trigger for a collection sweep.&lt;/p&gt;  &lt;h3&gt;&lt;a name="5.4"&gt;5.4 Is the lack of deterministic destruction in .NET a problem?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;It's certainly an issue that affects component design. If you have objects that maintain expensive or scarce resources (e.g. database locks), you need to provide some way to tell the object to release the resource when it is done. Microsoft recommend that you provide a method called Dispose() for this purpose. However, this causes problems for distributed objects - in a distributed system who calls the Dispose() method? Some form of reference-counting or ownership-management mechanism is needed to handle distributed objects - unfortunately the runtime offers no help with this.&lt;/p&gt;  &lt;h3&gt;&lt;a name="5.5"&gt;5.5 Should I implement Finalize on my class? Should I implement IDisposable?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;This issue is a little more complex than it first appears. There are really two categories of class that require deterministic destruction - the first category manipulate unmanaged types directly, whereas the second category manipulate &lt;i&gt;managed&lt;/i&gt; types that require deterministic destruction. An example of the first category is a class with an IntPtr member representing an OS file handle. An example of the second category is a class with a System.IO.FileStream member.&lt;/p&gt;&lt;p&gt;For the first category, it makes sense to implement IDisposable &lt;i&gt;and&lt;/i&gt; override Finalize. This allows the object user to 'do the right thing' by calling Dispose, but also provides a fallback of freeing the unmanaged resource in the Finalizer, should the calling code fail in its duty. However this logic does not apply to the second category of class, with only managed resources. In this case implementing Finalize is pointless, as managed member objects cannot be accessed in the Finalizer. This is because there is no guarantee about the ordering of Finalizer execution. So only the Dispose method should be implemented. (If you think about it, it doesn't really make sense to call Dispose on member objects from a Finalizer anyway, as the member object's Finalizer will do the required cleanup.)&lt;/p&gt;&lt;p&gt;For classes that need to implement IDisposable &lt;i&gt;and&lt;/i&gt; override Finalize, see Microsoft's &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconFinalizeDispose.asp"&gt;documented pattern&lt;/a&gt;. &lt;/p&gt;&lt;p&gt;Note that some developers argue that implementing a Finalizer is always a bad idea, as it hides a bug in your code (i.e. the lack of a Dispose call). A less radical approach is to implement Finalize but include a Debug.Assert at the start, thus signalling the problem in developer builds but allowing the cleanup to occur in release builds.&lt;/p&gt;  &lt;h3&gt;&lt;a name="5.6"&gt;5.6 Do I have any control over the garbage collection algorithm?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;A little. For example the System.GC class exposes a Collect method, which forces the garbage collector to collect all unreferenced objects immediately.&lt;/p&gt;&lt;p&gt;Also there is a &lt;b&gt;gcConcurrent&lt;/b&gt; setting that can be specified via the application configuration file. This specifies whether or not the garbage collector performs some of its collection activities on a separate thread. The setting only applies on multi-processor machines, and defaults to true.&lt;/p&gt;  &lt;h3&gt;&lt;a name="5.7"&gt;5.7 How can I find out what the garbage collector is doing?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Lots of interesting statistics are exported from the .NET runtime via the '.NET CLR xxx' performance counters. Use Performance Monitor to view them.&lt;/p&gt;  &lt;h3&gt;&lt;a name="5.8"&gt;5.8 What is the lapsed listener problem?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;The lapsed listener problem is one of the primary causes of leaks in .NET applications. It occurs when a subscriber (or 'listener') signs up for a publisher's event, but fails to unsubscribe. The failure to unsubscribe means that the publisher maintains a reference to the subscriber as long as the publisher is alive. For some publishers, this may be the duration of the application.&lt;/p&gt;&lt;p&gt;This situation causes two problems. The obvious problem is the leakage of the subscriber object. The other problem is the performance degredation due to the publisher sending redundant notifications to 'zombie' subscribers. &lt;/p&gt;&lt;p&gt;There are at least a couple of solutions to the problem. The simplest is to make sure the subscriber is unsubscribed from the publisher, typically by adding an Unsubscribe() method to the subscriber. Another solution, documented &lt;a href="http://www.windojitsu.com/blog/weakevent.html"&gt;here&lt;/a&gt; by Shawn Van Ness, is to change the publisher to use weak references in its subscriber list.&lt;/p&gt;  &lt;h3&gt;&lt;a name="5.9"&gt;5.9 When do I need to use GC.KeepAlive?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;It's very unintuitive, but the runtime can decide that an object is garbage much sooner than you expect. More specifically, an object can become garbage while a method is executing on the object, which is contrary to most developers' expectations. Chris Brumme &lt;a href="http://blogs.msdn.com/cbrumme/archive/2003/04/19/51365.aspx"&gt;explains&lt;/a&gt; the issue on his blog. I've taken Chris's code and expanded it into a full app that you can play with if you want to prove to yourself that this is a real problem:&lt;/p&gt;&lt;pre&gt;    using System;&lt;br /&gt;   using System.Runtime.InteropServices;&lt;br /&gt;&lt;br /&gt;   class Win32&lt;br /&gt;   {&lt;br /&gt;       [DllImport("kernel32.dll")]&lt;br /&gt;       public static extern IntPtr CreateEvent( IntPtr lpEventAttributes,&lt;br /&gt;           bool bManualReset,bool bInitialState, string lpName);&lt;br /&gt;&lt;br /&gt;       [DllImport("kernel32.dll", SetLastError=true)]&lt;br /&gt;       public static extern bool CloseHandle(IntPtr hObject);&lt;br /&gt;&lt;br /&gt;       [DllImport("kernel32.dll")]&lt;br /&gt;       public static extern bool SetEvent(IntPtr hEvent);&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   class EventUser&lt;br /&gt;   {&lt;br /&gt;       public EventUser()&lt;br /&gt;       {&lt;br /&gt;           hEvent = Win32.CreateEvent( IntPtr.Zero, false, false, null );&lt;br /&gt;       }&lt;br /&gt;      &lt;br /&gt;       ~EventUser()&lt;br /&gt;       {&lt;br /&gt;           Win32.CloseHandle( hEvent );&lt;br /&gt;           Console.WriteLine("EventUser finalized");&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       public void UseEvent()&lt;br /&gt;       {&lt;br /&gt;           UseEventInStatic( this.hEvent );&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       static void UseEventInStatic( IntPtr hEvent )&lt;br /&gt;       {&lt;br /&gt;           //GC.Collect();&lt;br /&gt;           bool bSuccess = Win32.SetEvent( hEvent );&lt;br /&gt;           Console.WriteLine( "SetEvent " + (bSuccess ? "succeeded" : "FAILED!") );&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       IntPtr hEvent;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   class App&lt;br /&gt;   {&lt;br /&gt;       static void Main(string[] args)&lt;br /&gt;       {&lt;br /&gt;           EventUser eventUser = new EventUser();&lt;br /&gt;           eventUser.UseEvent();&lt;br /&gt;       }&lt;br /&gt;   }&lt;/pre&gt;&lt;p&gt;If you run this code, it'll probably work fine, and you'll get the following output:&lt;/p&gt;&lt;pre&gt;    SetEvent succeeded&lt;br /&gt;   EventDemo finalized&lt;/pre&gt;&lt;p&gt;However, if you uncomment the GC.Collect() call in the UseEventInStatic() method, you'll get this output:&lt;/p&gt;&lt;pre&gt;    EventDemo finalized&lt;br /&gt;   SetEvent FAILED!&lt;/pre&gt;&lt;p&gt;(Note that you need to use a release build to reproduce this problem.)&lt;/p&gt;&lt;p&gt;So what's happening here? Well, at the point where UseEvent() calls UseEventInStatic(), a copy is taken of the hEvent field, and there are no further references to the EventUser object anywhere in the code. So as far as the runtime is concerned, the EventUser object is garbage and can be collected. Normally of course the collection won't happen immediately, so you'll get away with it, but sooner or later a collection will occur at the wrong time, and your app will fail. &lt;/p&gt;&lt;p&gt;A solution to this problem is to add a call to GC.KeepAlive(this) to the end of the UseEvent method, as &lt;a href="http://blogs.msdn.com/cbrumme/archive/2003/04/19/51365.aspx"&gt;Chris explains&lt;/a&gt;.&lt;/p&gt;  &lt;h2&gt;&lt;a name="6."&gt;6. Serialization&lt;/a&gt;&lt;/h2&gt;   &lt;h3&gt;&lt;a name="6.1"&gt;6.1 What is serialization?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Serialization is the process of converting an object into a stream of bytes. Deserialization is the opposite process, i.e. creating an object from a stream of bytes. Serialization/Deserialization is mostly used to transport objects (e.g. during remoting), or to persist objects (e.g. to a file or database).&lt;/p&gt;  &lt;h3&gt;&lt;a name="6.2"&gt;6.2 Does the .NET Framework have in-built support for serialization?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;There are two separate mechanisms provided by the .NET class library - XmlSerializer and SoapFormatter/BinaryFormatter. Microsoft uses XmlSerializer for Web Services, and SoapFormatter/BinaryFormatter for remoting. Both are available for use in your own code.&lt;/p&gt;  &lt;h3&gt;&lt;a name="6.3"&gt;6.3 I want to serialize instances of my class. Should I use XmlSerializer, SoapFormatter or BinaryFormatter?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;It depends. XmlSerializer has severe limitations such as the requirement that the target class has a parameterless constructor, and only public read/write properties and fields can be serialized. However, on the plus side, XmlSerializer has good support for customising the XML document that is produced or consumed. XmlSerializer's features mean that it is most suitable for cross-platform work, or for constructing objects from existing XML documents.&lt;/p&gt;&lt;p&gt;SoapFormatter and BinaryFormatter have fewer limitations than XmlSerializer. They can serialize private fields, for example. However they both require that the target class be marked with the [Serializable] attribute, so like XmlSerializer the class needs to be written with serialization in mind. Also there are some quirks to watch out for - for example on deserialization the constructor of the new object is not invoked.&lt;/p&gt;&lt;p&gt;The choice between SoapFormatter and BinaryFormatter depends on the application. BinaryFormatter makes sense where both serialization and deserialization will be performed on the .NET platform and where performance is important. SoapFormatter generally makes more sense in all other cases, for ease of debugging if nothing else.&lt;/p&gt;  &lt;h3&gt;&lt;a name="6.4"&gt;6.4 Can I customise the serialization process?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Yes. XmlSerializer supports a range of attributes that can be used to configure serialization for a particular class. For example, a field or property can be marked with the [XmlIgnore] attribute to exclude it from serialization. Another example is the [XmlElement] attribute, which can be used to specify the XML element name to be used for a particular property or field.&lt;/p&gt;&lt;p&gt;Serialization via SoapFormatter/BinaryFormatter can also be controlled to some extent by attributes. For example, the [NonSerialized] attribute is the equivalent of XmlSerializer's [XmlIgnore] attribute. Ultimate control of the serialization process can be acheived by implementing the the ISerializable interface on the class whose instances are to be serialized.&lt;/p&gt;  &lt;h3&gt;&lt;a name="6.5"&gt;6.5 Why is XmlSerializer so slow?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;There is a once-per-process-per-type overhead with XmlSerializer. So the first time you serialize or deserialize an object of a given type in an application, there is a significant delay. This normally doesn't matter, but it may mean, for example, that XmlSerializer is a poor choice for loading configuration settings during startup of a GUI application.&lt;/p&gt;  &lt;h3&gt;&lt;a name="6.6"&gt;6.6 Why do I get errors when I try to serialize a Hashtable?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;XmlSerializer will refuse to serialize instances of any class that implements IDictionary, e.g. Hashtable. SoapFormatter and BinaryFormatter do not have this restriction.&lt;/p&gt;  &lt;h3&gt;&lt;a name="6.7"&gt;6.7 XmlSerializer is throwing a generic "There was an error reflecting MyClass" error. How do I find out what the problem is?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Look at the InnerException property of the exception that is thrown to get a more specific error message.&lt;/p&gt;  &lt;h3&gt;&lt;a name="6.8"&gt;6.8 Why am I getting an InvalidOperationException when I serialize an ArrayList?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;XmlSerializer needs to know in advance what type of objects it will find in an ArrayList. To specify the type, use the XmlArrayItem attibute like this:&lt;/p&gt;&lt;pre&gt;    public class Person&lt;br /&gt;   {&lt;br /&gt;       public string Name;&lt;br /&gt;       public int Age;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public class Population&lt;br /&gt;   {&lt;br /&gt;       [XmlArrayItem(typeof(Person))] public ArrayList People;&lt;br /&gt;   }&lt;/pre&gt;  &lt;h2&gt;&lt;a name="7."&gt;7. Attributes&lt;/a&gt;&lt;/h2&gt;   &lt;h3&gt;&lt;a name="7.1"&gt;7.1 What are attributes?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;There are at least two types of .NET attribute. The first type I will refer to as a &lt;i&gt;metadata&lt;/i&gt; attribute - it allows some data to be attached to a class or method. This data becomes part of the metadata for the class, and (like other class metadata) can be accessed via reflection. An example of a metadata attribute is [serializable], which can be attached to a class and means that instances of the class can be serialized.&lt;/p&gt;&lt;pre&gt;    [serializable] public class CTest {}&lt;/pre&gt;&lt;p&gt;The other type of attribute is a &lt;i&gt;context&lt;/i&gt; attribute. Context attributes use a similar syntax to metadata attributes but they are fundamentally different. Context attributes provide an interception mechanism whereby instance activation and method calls can be pre- and/or post-processed. If you have encountered Keith Brown's universal delegator you'll be familiar with this idea. &lt;/p&gt;  &lt;h3&gt;&lt;a name="7.2"&gt;7.2 Can I create my own metadata attributes?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Yes. Simply derive a class from System.Attribute and mark it with the AttributeUsage attribute. For example:&lt;/p&gt;&lt;pre&gt;    [AttributeUsage(AttributeTargets.Class)]&lt;br /&gt;   public class InspiredByAttribute : System.Attribute&lt;br /&gt;   {&lt;br /&gt;       public string InspiredBy;&lt;br /&gt;  &lt;br /&gt;       public InspiredByAttribute( string inspiredBy )&lt;br /&gt;       {&lt;br /&gt;           InspiredBy = inspiredBy;&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   [InspiredBy("Andy Mc's brilliant .NET FAQ")]&lt;br /&gt;   class CTest&lt;br /&gt;   {&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   class CApp&lt;br /&gt;   {&lt;br /&gt;       public static void Main()&lt;br /&gt;       {       &lt;br /&gt;           object[] atts = typeof(CTest).GetCustomAttributes(true);&lt;br /&gt;&lt;br /&gt;           foreach( object att in atts )&lt;br /&gt;               if( att is InspiredByAttribute )&lt;br /&gt;                   Console.WriteLine( "Class CTest was inspired by {0}", ((InspiredByAttribute)att).InspiredBy  );&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;&lt;/pre&gt;  &lt;h3&gt;&lt;a name="7.3"&gt;7.3 Can I create my own context attibutes?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Yes. Take a look at Peter Drayton's &lt;a href="http://www.razorsoft.net/TraceHook.htm"&gt;Tracehook.NET&lt;/a&gt;.&lt;/p&gt;  &lt;h2&gt;&lt;a name="8."&gt;8. Code Access Security&lt;/a&gt;&lt;/h2&gt;   &lt;h3&gt;&lt;a name="8.1"&gt;8.1 What is Code Access Security (CAS)?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;CAS is the part of the .NET security model that determines whether or not code is allowed to run, and what resources it can use when it is running. For example, it is CAS that will prevent a .NET web applet from formatting your hard disk.&lt;/p&gt;  &lt;h3&gt;&lt;a name="8.2"&gt;8.2 How does CAS work?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;The CAS security policy revolves around two key concepts - code groups and permissions. Each .NET assembly is a member of a particular code group, and each code group is granted the permissions specified in a &lt;b&gt;named permission set&lt;/b&gt;.&lt;/p&gt;&lt;p&gt;For example, using the default security policy, a control downloaded from a web site belongs to the 'Zone - Internet' code group, which adheres to the permissions defined by the 'Internet' named permission set. (Naturally the 'Internet' named permission set represents a very restrictive range of permissions.) &lt;/p&gt;  &lt;h3&gt;&lt;a name="8.3"&gt;8.3 Who defines the CAS code groups?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Microsoft defines some default ones, but you can modify these and even create your own. To see the code groups defined on your system, run 'caspol -lg' from the command-line. On my system it looks like this:&lt;/p&gt;&lt;pre&gt;   Level = Machine&lt;br /&gt;&lt;br /&gt;  Code Groups:&lt;br /&gt;&lt;br /&gt;  1.  All code: Nothing&lt;br /&gt;  1.1.  Zone - MyComputer: FullTrust&lt;br /&gt;     1.1.1.  Honor SkipVerification requests: SkipVerification&lt;br /&gt;  1.2.  Zone - Intranet: LocalIntranet&lt;br /&gt;  1.3.  Zone - Internet: Internet&lt;br /&gt;  1.4.  Zone - Untrusted: Nothing&lt;br /&gt;  1.5.  Zone - Trusted: Internet&lt;br /&gt;  1.6.  StrongName -&lt;br /&gt;0024000004800000940000000602000000240000525341310004000003&lt;br /&gt;000000CFCB3291AA715FE99D40D49040336F9056D7886FED46775BC7BB5430BA4444FEF8348EBD06&lt;br /&gt;F962F39776AE4DC3B7B04A7FE6F49F25F740423EBF2C0B89698D8D08AC48D69CED0FC8F83B465E08&lt;br /&gt;07AC11EC1DCC7D054E807A43336DDE408A5393A48556123272CEEEE72F1660B71927D38561AABF5C&lt;br /&gt;AC1DF1734633C602F8F2D5: Everything&lt;/pre&gt;&lt;p&gt;Note the hierarchy of code groups - the top of the hierarchy is the most general ('All code'), which is then sub-divided into several groups, each of which in turn can be sub-divided. Also note that (somewhat counter-intuitively) a sub-group can be associated with a more permissive permission set than its parent.&lt;/p&gt;  &lt;h3&gt;&lt;a name="8.4"&gt;8.4 How do I define my own code group?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Use caspol. For example, suppose you trust code from www.mydomain.com and you want it have full access to your system, but you want to keep the default restrictions for all other internet sites. To achieve this, you would add a new code group as a sub-group of the 'Zone - Internet' group, like this:&lt;/p&gt;&lt;pre&gt; caspol -ag 1.3 -site www.mydomain.com FullTrust &lt;/pre&gt;&lt;p&gt;Now if you run caspol -lg you will see that the new group has been added as group 1.3.1:&lt;/p&gt;&lt;pre&gt; ...&lt;br /&gt;   1.3.  Zone - Internet: Internet&lt;br /&gt;      1.3.1.  Site - www.mydomain.com: FullTrust&lt;br /&gt;...&lt;/pre&gt;&lt;p&gt;Note that the numeric label (1.3.1) is just a caspol invention to make the code groups easy to manipulate from the command-line. The underlying runtime never sees it. &lt;/p&gt;  &lt;h3&gt;&lt;a name="8.5"&gt;8.5 How do I change the permission set for a code group?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Use caspol. If you are the machine administrator, you can operate at the 'machine' level - which means not only that the changes you make become the default for the machine, but also that users cannot change the permissions to be more permissive. If you are a normal (non-admin) user you can still modify the permissions, but only to make them more restrictive. For example, to allow intranet code to do what it likes you might do this:&lt;/p&gt;&lt;pre&gt; caspol -cg 1.2 FullTrust&lt;/pre&gt;&lt;p&gt;Note that because this is more permissive than the default policy (on a standard system), you should only do this at the machine level - doing it at the user level will have no effect.&lt;/p&gt;  &lt;h3&gt;&lt;a name="8.6"&gt;8.6 Can I create my own permission set?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Yes. Use caspol -ap, specifying an XML file containing the permissions in the permission set. To save you some time, &lt;a href="http://www.andymcm.com/samplepermset.xml"&gt;here&lt;/a&gt; is a sample file corresponding to the 'Everything' permission set - just edit to suit your needs. When you have edited the sample, add it to the range of available permission sets like this:&lt;/p&gt;&lt;pre&gt; caspol -ap samplepermset.xml&lt;/pre&gt;&lt;p&gt;Then, to apply the permission set to a code group, do something like this:&lt;/p&gt;&lt;pre&gt; caspol -cg 1.3 SamplePermSet&lt;/pre&gt;&lt;p&gt;(By default, 1.3 is the 'Internet' code group)&lt;/p&gt;  &lt;h3&gt;&lt;a name="8.7"&gt;8.7 I'm having some trouble with CAS. How can I troubleshoot the problem?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Caspol has a couple of options that might help. First, you can ask caspol to tell you what code group an assembly belongs to, using caspol -rsg. Similarly, you can ask what permissions are being applied to a particular assembly using caspol -rsp.&lt;/p&gt;  &lt;h3&gt;&lt;a name="8.8"&gt;8.8 I can't be bothered with CAS. Can I turn it off?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Yes, as long as you are an administrator. Just run:&lt;/p&gt;&lt;pre&gt; caspol -s off&lt;br /&gt;&lt;/pre&gt;  &lt;h2&gt;&lt;a name="9."&gt;9. Intermediate Language (IL)&lt;/a&gt;&lt;/h2&gt;   &lt;h3&gt;&lt;a name="9.1"&gt;9.1 Can I look at the IL for an assembly?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Yes. MS supply a tool called Ildasm that can be used to view the metadata and IL for an assembly. &lt;/p&gt;  &lt;h3&gt;&lt;a name="9.2"&gt;9.2 Can source code be reverse-engineered from IL?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Yes, it is often relatively straightforward to regenerate high-level source from IL. Lutz Roeder's &lt;a href="http://www.aisto.com/roeder/dotnet/"&gt;Reflector&lt;/a&gt; does a very good job of turning IL into C# or VB.NET.&lt;/p&gt;  &lt;h3&gt;&lt;a name="9.3"&gt;9.3 How can I stop my code being reverse-engineered from IL?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;You can buy an IL obfuscation tool. These tools work by 'optimising' the IL in such a way that reverse-engineering becomes much more difficult.&lt;/p&gt;&lt;p&gt;Of course if you are writing web services then reverse-engineering is not a problem as clients do not have access to your IL.&lt;/p&gt;  &lt;h3&gt;&lt;a name="9.4"&gt;9.4 Can I write IL programs directly?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Yes. &lt;a href="http://www.razorsoft.net/"&gt;Peter Drayton&lt;/a&gt; posted this simple example to the DOTNET mailing list:&lt;/p&gt;&lt;pre&gt;    .assembly MyAssembly {}&lt;br /&gt;   .class MyApp {&lt;br /&gt;     .method static void Main() {&lt;br /&gt;       .entrypoint&lt;br /&gt;       ldstr      "Hello, IL!"&lt;br /&gt;       call       void System.Console::WriteLine(class System.Object)&lt;br /&gt;       ret&lt;br /&gt;     }&lt;br /&gt;   }&lt;/pre&gt;&lt;p&gt;Just put this into a file called hello.il, and then run ilasm hello.il. An exe assembly will be generated.&lt;/p&gt;  &lt;h3&gt;&lt;a name="9.5"&gt;9.5 Can I do things in IL that I can't do in C#?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Yes. A couple of simple examples are that you can throw exceptions that are not derived from System.Exception, and you can have non-zero-based arrays.&lt;/p&gt;  &lt;h2&gt;&lt;a name="10."&gt;10. Implications for COM&lt;/a&gt;&lt;/h2&gt;   &lt;h3&gt;&lt;a name="10.1"&gt;10.1 Does .NET replace COM?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;This subject causes a lot of controversy, as you'll see if you read the mailing list archives. Take a look at the following two threads:&lt;/p&gt;&lt;p&gt;&lt;a href="http://discuss.develop.com/archives/wa.exe?A2=ind0007&amp;L=DOTNET&amp;amp;D=0&amp;P=68241"&gt;http://discuss.develop.com/archives/wa.exe?A2=ind0007&amp;amp;L=DOTNET&amp;D=0&amp;amp;P=68241&lt;/a&gt;&lt;br /&gt;&lt;a href="http://discuss.develop.com/archives/wa.exe?A2=ind0007&amp;L=DOTNET&amp;amp;P=R60761"&gt;http://discuss.develop.com/archives/wa.exe?A2=ind0007&amp;L=DOTNET&amp;amp;P=R60761&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The bottom line is that .NET has its own mechanisms for type interaction, and they don't use COM. No IUnknown, no IDL, no typelibs, no registry-based activation. This is mostly good, as a lot of COM was ugly. Generally speaking, .NET allows you to package and use components in a similar way to COM, but makes the whole thing a bit easier.&lt;br /&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="10.2"&gt;10.2 Is DCOM dead?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Pretty much, for .NET developers. The .NET Framework has a new remoting model which is not based on DCOM. DCOM was pretty much dead anyway, once firewalls became widespread and Microsoft got &lt;a href="http://www.w3.org/TR/soap/"&gt;SOAP&lt;/a&gt; fever. Of course DCOM will still be used in interop scenarios. &lt;/p&gt;  &lt;h3&gt;&lt;a name="10.3"&gt;10.3 Is COM+ dead?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Not immediately. The approach for .NET 1.0 was to provide access to the existing COM+ services (through an interop layer) rather than replace the services with native .NET ones. Various tools and attributes were provided to make this as painless as possible. Over time it is expected that interop will become more seamless - this may mean that some services become a core part of the CLR, and/or it may mean that some services will be rewritten as managed code which runs on top of the CLR.&lt;/p&gt;&lt;p&gt;For more on this topic, search for postings by Joe Long in the archives - Joe is the MS group manager for COM+. Start with this message:&lt;/p&gt;&lt;p&gt;&lt;a href="http://discuss.develop.com/archives/wa.exe?A2=ind0007&amp;L=DOTNET&amp;amp;P=R68370"&gt;http://discuss.develop.com/archives/wa.exe?A2=ind0007&amp;L=DOTNET&amp;amp;P=R68370&lt;/a&gt; &lt;/p&gt;  &lt;h3&gt;&lt;a name="10.4"&gt;10.4 Can I use COM components from .NET programs?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Yes. COM components are accessed from the .NET runtime via a Runtime Callable Wrapper (RCW). This wrapper turns the COM interfaces exposed by the COM component into .NET-compatible interfaces. For oleautomation interfaces, the RCW can be generated automatically from a type library. For non-oleautomation interfaces, it may be necessary to develop a custom RCW which manually maps the types exposed by the COM interface to .NET-compatible types.&lt;/p&gt;&lt;p&gt;Here's a simple example for those familiar with ATL. First, create an ATL component which implements the following IDL:&lt;/p&gt;&lt;pre&gt;    import "oaidl.idl";&lt;br /&gt;   import "ocidl.idl";&lt;br /&gt;&lt;br /&gt;   [&lt;br /&gt;       object,&lt;br /&gt;       uuid(EA013F93-487A-4403-86EC-FD9FEE5E6206),&lt;br /&gt;       helpstring("ICppName Interface"),&lt;br /&gt;       pointer_default(unique),&lt;br /&gt;       oleautomation&lt;br /&gt;   ]&lt;br /&gt;&lt;br /&gt;   interface ICppName : IUnknown&lt;br /&gt;   {&lt;br /&gt;       [helpstring("method SetName")] HRESULT SetName([in] BSTR name);&lt;br /&gt;       [helpstring("method GetName")] HRESULT GetName([out,retval] BSTR *pName );&lt;br /&gt;   };&lt;br /&gt;&lt;br /&gt;   [&lt;br /&gt;       uuid(F5E4C61D-D93A-4295-A4B4-2453D4A4484D),&lt;br /&gt;       version(1.0),&lt;br /&gt;       helpstring("cppcomserver 1.0 Type Library")&lt;br /&gt;   ]&lt;br /&gt;   library CPPCOMSERVERLib&lt;br /&gt;   {&lt;br /&gt;       importlib("stdole32.tlb");&lt;br /&gt;       importlib("stdole2.tlb");&lt;br /&gt;       [&lt;br /&gt;           uuid(600CE6D9-5ED7-4B4D-BB49-E8D5D5096F70), &lt;br /&gt;           helpstring("CppName Class")&lt;br /&gt;       ]&lt;br /&gt;       coclass CppName&lt;br /&gt;       {&lt;br /&gt;           [default] interface ICppName;&lt;br /&gt;       };&lt;br /&gt;   };&lt;/pre&gt;&lt;p&gt;When you've built the component, you should get a typelibrary. Run the TLBIMP utility on the typelibary, like this:&lt;/p&gt;&lt;pre&gt;    tlbimp cppcomserver.tlb&lt;/pre&gt;&lt;p&gt;If successful, you will get a message like this:&lt;/p&gt;&lt;pre&gt;    Typelib imported successfully to CPPCOMSERVERLib.dll&lt;/pre&gt;&lt;p&gt;You now need a .NET client - let's use C#. Create a .cs file containing the following code:&lt;/p&gt;&lt;pre&gt;    using System;&lt;br /&gt;   using CPPCOMSERVERLib;&lt;br /&gt;&lt;br /&gt;   public class MainApp&lt;br /&gt;   {&lt;br /&gt;       static public void Main()&lt;br /&gt;       {&lt;br /&gt;           CppName cppname = new CppName();&lt;br /&gt;           cppname.SetName( "bob" );&lt;br /&gt;           Console.WriteLine( "Name is " + cppname.GetName() );&lt;br /&gt;       }&lt;br /&gt;   }&lt;/pre&gt;&lt;p&gt;Compile the C# code like this:&lt;/p&gt;&lt;pre&gt;    csc /r:cppcomserverlib.dll csharpcomclient.cs&lt;/pre&gt;&lt;p&gt;Note that the compiler is being told to reference the DLL we previously generated from the typelibrary using TLBIMP. You should now be able to run csharpcomclient.exe, and get the following output on the console:&lt;/p&gt;&lt;pre&gt;    Name is bob&lt;br /&gt;&lt;/pre&gt;  &lt;h3&gt;&lt;a name="10.5"&gt;10.5 Can I use .NET components from COM programs?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Yes. .NET components are accessed from COM via a COM Callable Wrapper (CCW). This is similar to a RCW (see previous question), but works in the opposite direction. Again, if the wrapper cannot be automatically generated by the .NET development tools, or if the automatic behaviour is not desirable, a custom CCW can be developed. Also, for COM to 'see' the .NET component, the .NET component must be registered in the registry.&lt;/p&gt;&lt;p&gt;Here's a simple example. Create a C# file called testcomserver.cs and put the following in it:&lt;/p&gt;&lt;pre&gt;    using System;&lt;br /&gt;   using System.Runtime.InteropServices;&lt;br /&gt;&lt;br /&gt;   namespace AndyMc&lt;br /&gt;   {&lt;br /&gt;       [ClassInterface(ClassInterfaceType.AutoDual)]&lt;br /&gt;       public class CSharpCOMServer&lt;br /&gt;       {&lt;br /&gt;           public CSharpCOMServer() {}&lt;br /&gt;           public void SetName( string name ) { m_name = name; }&lt;br /&gt;           public string GetName() { return m_name; } &lt;br /&gt;           private string m_name;&lt;br /&gt;       }         &lt;br /&gt;   }&lt;/pre&gt;&lt;p&gt;Then compile the .cs file as follows:&lt;/p&gt;&lt;pre&gt;    csc /target:library testcomserver.cs&lt;/pre&gt;&lt;p&gt;You should get a dll, which you register like this:&lt;/p&gt;&lt;pre&gt;    regasm testcomserver.dll /tlb:testcomserver.tlb /codebase&lt;/pre&gt;&lt;p&gt;Now you need to create a client to test your .NET COM component. VBScript will do - put the following in a file called comclient.vbs:&lt;/p&gt;&lt;pre&gt;    Dim dotNetObj&lt;br /&gt;   Set dotNetObj = CreateObject("AndyMc.CSharpCOMServer")&lt;br /&gt;   dotNetObj.SetName ("bob")&lt;br /&gt;   MsgBox "Name is " &amp; dotNetObj.GetName()&lt;/pre&gt;&lt;p&gt;and run the script like this:&lt;/p&gt;&lt;pre&gt;    wscript comclient.vbs&lt;/pre&gt;&lt;p&gt;And hey presto you should get a message box displayed with the text "Name is bob".&lt;/p&gt;&lt;p&gt;An alternative to the approach above it to use the &lt;a href="http://staff.develop.com/jasonw/clr/readme.htm"&gt;dm.net moniker&lt;/a&gt; developed by Jason Whittington and Don Box.&lt;/p&gt;  &lt;h3&gt;&lt;a name="10.6"&gt;10.6 Is ATL redundant in the .NET world?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Yes. ATL will continue to be valuable for writing COM components for some time, but it has no place in the .NET world.&lt;/p&gt;  &lt;h2&gt;&lt;a name="11."&gt;11. Threads&lt;/a&gt;&lt;/h2&gt;   &lt;h3&gt;&lt;a name="11.1"&gt;11.1 How do I spawn a thread?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Create an instance of a System.Threading.Thread object, passing it an instance of a ThreadStart delegate that will be executed on the new thread. For example:&lt;/p&gt;&lt;pre&gt;    class MyThread&lt;br /&gt;   {&lt;br /&gt;       public MyThread( string initData )&lt;br /&gt;       {&lt;br /&gt;           m_data = initData;&lt;br /&gt;           m_thread = new Thread( new ThreadStart(ThreadMain) );   &lt;br /&gt;           m_thread.Start();   &lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       // ThreadMain() is executed on the new thread.&lt;br /&gt;       private void ThreadMain()&lt;br /&gt;       {   &lt;br /&gt;           Console.WriteLine( m_data );&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       public void WaitUntilFinished()&lt;br /&gt;       {&lt;br /&gt;           m_thread.Join();&lt;br /&gt;       }   &lt;br /&gt;&lt;br /&gt;       private Thread m_thread;&lt;br /&gt;       private string m_data;&lt;br /&gt;   }&lt;/pre&gt;&lt;p&gt;In this case creating an instance of the MyThread class is sufficient to spawn the thread and execute the MyThread.ThreadMain() method:&lt;/p&gt;&lt;pre&gt;    MyThread t = new MyThread( "Hello, world." );&lt;br /&gt;   t.WaitUntilFinished();&lt;br /&gt;&lt;/pre&gt;  &lt;h3&gt;&lt;a name="11.2"&gt;11.2 How do I stop a thread?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;There are several options. First, you can use your own communication mechanism to tell the ThreadStart method to finish. Alternatively the Thread class has in-built support for instructing the thread to stop. The two principle methods are Thread.Interrupt() and Thread.Abort(). The former will cause a ThreadInterruptedException to be thrown on the thread when it next goes into a WaitJoinSleep state. In other words, Thread.Interrupt is a polite way of asking the thread to stop when it is no longer doing any useful work. In contrast, Thread.Abort() throws a ThreadAbortException regardless of what the thread is doing. Furthermore, the ThreadAbortException cannot normally be caught (though the ThreadStart's finally method will be executed). Thread.Abort() is a heavy-handed mechanism which should not normally be required.&lt;/p&gt;  &lt;h3&gt;&lt;a name="11.3"&gt;11.3 How do I use the thread pool?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;By passing an instance of a WaitCallback delegate to the ThreadPool.QueueUserWorkItem() method&lt;/p&gt;&lt;pre&gt;    class CApp&lt;br /&gt;   {&lt;br /&gt;       static void Main()&lt;br /&gt;       {&lt;br /&gt;           string s = "Hello, World";&lt;br /&gt;           ThreadPool.QueueUserWorkItem( new WaitCallback( DoWork ), s );&lt;br /&gt;      &lt;br /&gt;           Thread.Sleep( 1000 );    // Give time for work item to be executed&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       // DoWork is executed on a thread from the thread pool.&lt;br /&gt;       static void DoWork( object state )&lt;br /&gt;       {&lt;br /&gt;           Console.WriteLine( state );&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;&lt;/pre&gt;  &lt;h3&gt;&lt;a name="11.4"&gt;11.4 How do I know when my thread pool work item has completed?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;There is no way to query the thread pool for this information. You must put code into the WaitCallback method to signal that it has completed. Events are useful for this.&lt;/p&gt;  &lt;h3&gt;&lt;a name="11.5"&gt;11.5 How do I prevent concurrent access to my data?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Each object has a concurrency lock (critical section) associated with it. The System.Threading.Monitor.Enter/Exit methods are used to acquire and release this lock. For example, instances of the following class only allow one thread at a time to enter method f():&lt;/p&gt;&lt;pre&gt;    class C&lt;br /&gt;   {&lt;br /&gt;       public void f()&lt;br /&gt;       {&lt;br /&gt;           try&lt;br /&gt;           {&lt;br /&gt;               Monitor.Enter(this);&lt;br /&gt;               ...&lt;br /&gt;           }&lt;br /&gt;           finally&lt;br /&gt;           {&lt;br /&gt;               Monitor.Exit(this);&lt;br /&gt;           }&lt;br /&gt;       }&lt;br /&gt;   }&lt;/pre&gt;&lt;p&gt;C# has a 'lock' keyword which provides a convenient shorthand for the code above:&lt;/p&gt;&lt;pre&gt;    class C&lt;br /&gt;   {&lt;br /&gt;       public void f()&lt;br /&gt;       {&lt;br /&gt;           lock(this)&lt;br /&gt;           {&lt;br /&gt;               ...&lt;br /&gt;           }&lt;br /&gt;       }&lt;br /&gt;   }&lt;/pre&gt;&lt;p&gt;Note that calling Monitor.Enter(myObject) does NOT mean that all access to myObject is serialized. It means that the synchronisation lock associated with myObject has been acquired, and no other thread can acquire that lock until Monitor.Exit(o) is called. In other words, this class is functionally equivalent to the classes above:&lt;/p&gt;&lt;pre&gt;    class C&lt;br /&gt;   {&lt;br /&gt;       public void f()&lt;br /&gt;       {&lt;br /&gt;           lock( m_object )&lt;br /&gt;           {&lt;br /&gt;               ...&lt;br /&gt;           }&lt;br /&gt;       }&lt;br /&gt;      &lt;br /&gt;       private m_object = new object();&lt;br /&gt;   }&lt;/pre&gt;&lt;p&gt;Actually, it could be argued that this version of the code is superior, as the lock is totally encapsulated within the class, and not accessible to the user of the object. &lt;/p&gt;  &lt;h3&gt;&lt;a name="11.6"&gt;11.6 Should I use ReaderWriterLock instead of Monitor.Enter/Exit?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Maybe, but be careful. ReaderWriterLock is used to allow multiple threads to read from a data source, while still granting exclusive access to a single writer thread. This makes sense for data access that is mostly read-only, but there are some caveats. First, ReaderWriterLock is relatively poor performing compared to Monitor.Enter/Exit, which offsets some of the benefits. Second, you need to be very sure that the data structures you are accessing fully support multithreaded read access. Finally, there is apparently a bug in the v1.1 ReaderWriterLock that can cause starvation for writers when there are a large number of readers. &lt;/p&gt;&lt;p&gt;Ian Griffiths has some interesting discussion on ReaderWriterLock &lt;a href="http://www.interact-sw.co.uk/iangblog/2004/04/26/rwlockvsmonitor"&gt;here&lt;/a&gt; and &lt;a href="http://www.interact-sw.co.uk/iangblog/2004/05/12/rwlock"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;h2&gt;&lt;a name="12."&gt;12. Tracing&lt;/a&gt;&lt;/h2&gt;   &lt;h3&gt;&lt;a name="12.1"&gt;12.1 Is there built-in support for tracing/logging?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Yes, in the System.Diagnostics namespace. There are two main classes that deal with tracing - Debug and Trace. They both work in a similar way - the difference is that tracing from the Debug class only works in builds that have the DEBUG symbol defined, whereas tracing from the Trace class only works in builds that have the TRACE symbol defined. Typically this means that you should use System.Diagnostics.Trace.WriteLine for tracing that you want to work in debug and release builds, and System.Diagnostics.Debug.WriteLine for tracing that you want to work only in debug builds.&lt;/p&gt;  &lt;h3&gt;&lt;a name="12.2"&gt;12.2 Can I redirect tracing to a file?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Yes. The Debug and Trace classes both have a Listeners property, which is a collection of sinks that receive the tracing that you send via Debug.WriteLine and Trace.WriteLine respectively. By default the Listeners collection contains a single sink, which is an instance of the DefaultTraceListener class. This sends output to the Win32 OutputDebugString() function and also the System.Diagnostics.Debugger.Log() method. This is useful when debugging, but if you're trying to trace a problem at a customer site, redirecting the output to a file is more appropriate. Fortunately, the TextWriterTraceListener class is provided for this purpose.&lt;/p&gt;&lt;p&gt;Here's how to use the TextWriterTraceListener class to redirect Trace output to a file:&lt;/p&gt;&lt;pre&gt;    Trace.Listeners.Clear();&lt;br /&gt;   FileStream fs = new FileStream( @"c:\log.txt", FileMode.Create, FileAccess.Write );&lt;br /&gt;   Trace.Listeners.Add( new TextWriterTraceListener( fs ) );&lt;br /&gt;&lt;br /&gt;   Trace.WriteLine( @"This will be writen to c:\log.txt!" );&lt;br /&gt;   Trace.Flush();&lt;/pre&gt;&lt;p&gt;Note the use of Trace.Listeners.Clear() to remove the default listener. If you don't do this, the output will go to the file &lt;i&gt;and&lt;/i&gt; OutputDebugString(). Typically this is not what you want, because OutputDebugString() imposes a big performance hit.&lt;/p&gt;  &lt;h3&gt;&lt;a name="12.3"&gt;12.3 Can I customise the trace output?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Yes. You can write your own TraceListener-derived class, and direct all output through it. Here's a simple example, which derives from TextWriterTraceListener (and therefore has in-built support for writing to files, as shown above) and adds timing information and the thread ID for each trace line:&lt;/p&gt;&lt;pre&gt;    class MyListener : TextWriterTraceListener&lt;br /&gt;   {&lt;br /&gt;       public MyListener( Stream s ) : base(s)&lt;br /&gt;       {&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       public override void WriteLine( string s )&lt;br /&gt;       {&lt;br /&gt;           Writer.WriteLine( "{0:D8} [{1:D4}] {2}",&lt;br /&gt;               Environment.TickCount - m_startTickCount,&lt;br /&gt;               AppDomain.GetCurrentThreadId(),&lt;br /&gt;               s );&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       protected int m_startTickCount = Environment.TickCount;&lt;br /&gt;   }&lt;/pre&gt;&lt;p&gt;(Note that this implementation is not complete - the TraceListener.Write method is not overridden for example.)&lt;/p&gt;&lt;p&gt;The beauty of this approach is that when an instance of MyListener is added to the Trace.Listeners collection, all calls to Trace.WriteLine() go through MyListener, including calls made by referenced assemblies that know nothing about the MyListener class.&lt;/p&gt;  &lt;h3&gt;&lt;a name="12.4"&gt;12.4 Are there any third party logging components available?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;&lt;a href="http://logging.apache.org/log4net/"&gt;Log4net&lt;/a&gt; is a port of the established log4j Java logging component.&lt;/p&gt;  &lt;h2&gt;&lt;a name="13."&gt;13. Miscellaneous&lt;/a&gt;&lt;/h2&gt;   &lt;h3&gt;&lt;a name="13.1"&gt;13.1 How does .NET remoting work?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;.NET remoting involves sending messages along channels. Two of the standard channels are HTTP and TCP. TCP is intended for LANs only - HTTP can be used for LANs or WANs (internet).&lt;/p&gt;&lt;p&gt;Support is provided for multiple message serializarion formats. Examples are SOAP (XML-based) and binary. By default, the HTTP channel uses SOAP (via the .NET runtime Serialization SOAP Formatter), and the TCP channel uses binary (via the .NET runtime Serialization Binary Formatter). But either channel can use either serialization format.&lt;/p&gt;&lt;p&gt;There are a number of styles of remote access:&lt;/p&gt;&lt;ul&gt;&lt;li&gt; &lt;b&gt;SingleCall&lt;/b&gt;. Each incoming request from a client is serviced by a new object. The object is thrown away when the request has finished.&lt;/li&gt;&lt;li&gt; &lt;b&gt;Singleton&lt;/b&gt;. All incoming requests from clients are processed by a single server object.&lt;/li&gt;&lt;li&gt; &lt;b&gt;Client-activated object&lt;/b&gt;. This is the old stateful (D)COM model whereby the client receives a reference to the remote object and holds that reference (thus keeping the remote object alive) until it is finished with it.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Distributed garbage collection of objects is managed by a system called 'leased based lifetime'. Each object has a lease time, and when that time expires the object is disconnected from the .NET runtime remoting infrastructure. Objects have a default renew time - the lease is renewed when a successful call is made from the client to the object. The client can also explicitly renew the lease.&lt;/p&gt;&lt;p&gt;If you're interested in using XML-RPC as an alternative to SOAP, take a look at Charles Cook's &lt;a href="http://www.cookcomputing.com/xmlrpc/xmlrpc.shtml"&gt;XML-RPC.Net&lt;/a&gt;.&lt;/p&gt;  &lt;h3&gt;&lt;a name="13.2"&gt;13.2 How can I get at the Win32 API from a .NET program?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Use P/Invoke. This uses similar technology to COM Interop, but is used to access static DLL entry points instead of COM objects. Here is an example of C# calling the Win32 MessageBox function:&lt;/p&gt;&lt;pre&gt;    using System;&lt;br /&gt;   using System.Runtime.InteropServices;&lt;br /&gt;&lt;br /&gt;   class MainApp&lt;br /&gt;   {&lt;br /&gt;       [DllImport("user32.dll", EntryPoint="MessageBox", SetLastError=true, CharSet=CharSet.Auto)]    &lt;br /&gt;       public static extern int MessageBox(int hWnd, String strMessage, String strCaption, uint uiType);&lt;br /&gt;  &lt;br /&gt;       public static void Main()&lt;br /&gt;       {&lt;br /&gt;           MessageBox( 0, "Hello, this is PInvoke in operation!", ".NET", 0 );&lt;br /&gt;       }&lt;br /&gt;   }        &lt;/pre&gt;&lt;p&gt;&lt;a href="http://www,pinvoke.net/"&gt;Pinvoke.net&lt;/a&gt; is a great resource for off-the-shelf P/Invoke signatures.&lt;/p&gt;  &lt;h3&gt;&lt;a name="13.3"&gt;13.3 How do I write to the application configuration file at runtime?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;You don't. See &lt;a href="http://www.interact-sw.co.uk/iangblog/2004/11/25/savingconfig"&gt;http://www.interact-sw.co.uk/iangblog/2004/11/25/savingconfig&lt;/a&gt;.&lt;/p&gt;  &lt;h3&gt;&lt;a name="13.4"&gt;13.4 What is the difference between an event and a delegate?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;An event is just a wrapper for a multicast delegate. Adding a public event to a class is almost the same as adding a public multicast delegate field. In both cases, subscriber objects can register for notifications, and in both cases the publisher object can send notifications to the subscribers. However, a public multicast delegate has the undesirable property that external objects can &lt;i&gt;invoke&lt;/i&gt; the delegate, something we'd normally want to restrict to the publisher. Hence events - an event adds public methods to the containing class to add and remove receivers, but does not make the invocation mechanism public. &lt;/p&gt;&lt;p&gt;See this &lt;a href="http://blog.monstuff.com/archives/000040.html"&gt;post&lt;/a&gt; by Julien Couvreur for more discussion.&lt;/p&gt;  &lt;h3&gt;&lt;a name="13.5"&gt;13.5 What size is a .NET object?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Each instance of a reference type has two fields maintained by the runtime - a method table pointer and a sync block. These are 4 bytes each on a 32-bit system, making a total of 8 bytes per object overhead. Obviously the instance data for the type must be added to this to get the overall size of the object. So, for example, instances of the following class are 12 bytes each:&lt;/p&gt;&lt;pre&gt;    class MyInt&lt;br /&gt;   {&lt;br /&gt;       ...&lt;br /&gt;       private int x;&lt;br /&gt;   }&lt;/pre&gt;&lt;p&gt;However, note that with the current implementation of the CLR there seems to be a minimum object size of 12 bytes, even for classes with no data (e.g. System.Object).&lt;/p&gt;&lt;p&gt;Values types have no equivalent overhead.&lt;/p&gt;  &lt;h3&gt;&lt;a name="13.6"&gt;13.6 Will my .NET app run on 64-bit Windows?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;64-bit (x64) versions of Windows support both 32-bit and 64-bit processes, and corresponding 32-bit and 64-bit versions of .NET 2.0. (.NET 1.1 is 32-bit only).&lt;/p&gt;&lt;p&gt;.NET 1.x apps automatically run as 32-bit processes on 64-bit Windows.&lt;/p&gt;&lt;p&gt;.NET 2.0 apps can either run as 32-bit processes or as 64-bit processes. The OS decides which to use based on the PE header of the executable. The flags in the PE header are controlled via the compiler /platform switch, which allows the target of the app to be specified as 'x86', 'x64' or 'any cpu'. Normally you specify 'any cpu', and your app will run as 32-bit on 32-bit Windows and 64-bit on 64-bit Windows. However if you have some 32-bit native code in your app (loaded via COM interop, for example), you will need to specify 'x86', which will force 64-bit Windows to load your app in a 32-bit process. You can also tweak the 32-bit flag in the PE header using the SDK corflags utility. &lt;/p&gt;&lt;p&gt;Some more explanation here:&lt;/p&gt;&lt;p&gt;&lt;a href="http://blogs.msdn.com/gauravseth/archive/2006/03/07/545104.aspx"&gt;http://blogs.msdn.com/gauravseth/archive/2006/03/07/545104.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/joshwil/archive/2005/04/08/406567.aspx"&gt;http://blogs.msdn.com/joshwil/archive/2005/04/08/406567.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/netframework/programming/64bit/gettingstarted/"&gt;http://msdn.microsoft.com/netframework/programming/64bit/gettingstarted/&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="13.7"&gt;13.7 What is reflection?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;All .NET compilers produce metadata about the types defined in the modules they produce. This metadata is packaged along with the module (modules in turn are packaged together in assemblies), and can be accessed by a mechanism called &lt;b&gt;reflection&lt;/b&gt;. The System.Reflection namespace contains classes that can be used to interrogate the types for a module/assembly.&lt;/p&gt;&lt;p&gt;Using reflection to access .NET metadata is very similar to using ITypeLib/ITypeInfo to access type library data in COM, and it is used for similar purposes - e.g. determining data type sizes for marshaling data across context/process/machine boundaries.&lt;/p&gt;&lt;p&gt;Reflection can also be used to dynamically invoke methods (see System.Type.InvokeMember), or even create types dynamically at run-time (see System.Reflection.Emit.TypeBuilder). &lt;/p&gt;  &lt;h2&gt;&lt;a name="14."&gt;14. .NET 2.0&lt;/a&gt;&lt;/h2&gt;   &lt;h3&gt;&lt;a name="14.1"&gt;14.1 What are the new features of .NET 2.0?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Generics, anonymous methods, partial classes, iterators, property visibility (separate visibility for get and set) and static classes. See &lt;a href="http://msdn.microsoft.com/msdnmag/issues/04/05/C20/default.aspx"&gt;http://msdn.microsoft.com/msdnmag/issues/04/05/C20/default.aspx&lt;/a&gt; for more information about these features.&lt;/p&gt;  &lt;h3&gt;&lt;a name="14.2"&gt;14.2 What are the new 2.0 features useful for?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Generics are useful for writing efficient type-independent code, particularly where the types might include value types. The obvious application is container classes, and the .NET 2.0 class library includes a suite of generic container classes in the System.Collections.Generic namespace. Here's a simple example of a generic container class being used:&lt;/p&gt;&lt;pre&gt;    List&lt;int&gt; myList = new List&lt;int&gt;();&lt;br /&gt;   myList.Add( 10 );&lt;/pre&gt;&lt;p&gt;Anonymous methods reduce the amount of code you have to write when using delegates, and are therefore especially useful for GUI programming. Here's an example&lt;/p&gt;&lt;pre&gt;    AppDomain.CurrentDomain.ProcessExit += delegate { Console.WriteLine("Process ending ..."); };&lt;/pre&gt;&lt;p&gt;Partial classes is a useful feature for separating machine-generated code from hand-written code in the same class, and will therefore be heavily used by development tools such as Visual Studio. &lt;/p&gt;&lt;p&gt;Iterators reduce the amount of code you need to write to implement IEnumerable/IEnumerator. Here's some sample code:&lt;/p&gt;&lt;pre&gt;    static void Main()&lt;br /&gt;   {&lt;br /&gt;       RandomEnumerator re = new RandomEnumerator( 5 );&lt;br /&gt;       foreach( double r in re )&lt;br /&gt;           Console.WriteLine( r );&lt;br /&gt;       Console.Read();&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   class RandomEnumerator : IEnumerable&lt;double&gt;&lt;br /&gt;   {&lt;br /&gt;       public RandomEnumerator(int size) { m_size = size; }&lt;br /&gt;&lt;br /&gt;       public IEnumerator&lt;double&gt; GetEnumerator()&lt;br /&gt;       {&lt;br /&gt;           Random rand = new Random();&lt;br /&gt;           for( int i=0; i &lt; m_size; i++ )&lt;br /&gt;               yield return rand.NextDouble();&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       int m_size = 0;&lt;br /&gt;   }&lt;/pre&gt;&lt;p&gt;The use of 'yield return' is rather strange at first sight. It effectively synthethises an implementation of IEnumerator, something we had to do manually in .NET 1.x.&lt;/p&gt;  &lt;h3&gt;&lt;a name="14.3"&gt;14.3 What's the problem with .NET generics?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;.NET generics work great for container classes. But what about other uses? Well, it turns out that .NET generics have a major limitation - they require the type parameter to be &lt;i&gt;constrained&lt;/i&gt;. For example, you cannot do this:&lt;/p&gt;&lt;pre&gt;    static class Disposer&lt;t&gt;&lt;br /&gt;   {&lt;br /&gt;       public static void Dispose(T obj) { obj.Dispose(); }&lt;br /&gt;   }&lt;/pre&gt;&lt;p&gt;The C# compiler will refuse to compile this code, as the type T has not been constrained, and therefore only supports the methods of System.Object. Dispose is not a method on System.Object, so the compilation fails. To fix this code, we need to add a &lt;b&gt;where&lt;/b&gt; clause, to reassure the compiler that our type T does indeed have a Dispose method&lt;/p&gt;&lt;pre&gt;    static class Disposer&lt;t&gt; where T : IDisposable&lt;br /&gt;   {&lt;br /&gt;       public static void Dispose(T obj) { obj.Dispose(); }&lt;br /&gt;   }&lt;/pre&gt;&lt;p&gt;The problem is that the requirement for explicit contraints is very limiting. We can use constraints to say that T implements a particular &lt;i&gt;interface&lt;/i&gt;, but we can't dilute that to simply say that T implements a particular &lt;i&gt;method&lt;/i&gt;. Contrast this with C++ templates (for example), where no constraint at all is required - it is &lt;i&gt;assumed&lt;/i&gt; (and verified at compile time) that if the code invokes the Dispose() method on a type, then the type will support the method. &lt;/p&gt;&lt;p&gt;In fact, after writing generic code with interface constraints, we quickly see that we haven't gained much over non-generic interface-based programming. For example, we can easily rewrite the Disposer class without generics:&lt;/p&gt;&lt;pre&gt;    static class Disposer&lt;br /&gt;   {&lt;br /&gt;       public static void Dispose( IDisposable obj ) { obj.Dispose(); }&lt;br /&gt;   }&lt;/pre&gt;&lt;p&gt;For more on this topic, start by reading the following articles:&lt;/p&gt;&lt;p&gt;Bruce Eckel: &lt;a href="http://www.mindview.net/WebLog/log-0050"&gt;http://www.mindview.net/WebLog/log-0050&lt;/a&gt;&lt;br /&gt;Ian Griffiths: &lt;a href="http://www.interact-sw.co.uk/iangblog/2004/03/14/generics"&gt;http://www.interact-sw.co.uk/iangblog/2004/03/14/generics&lt;/a&gt;&lt;br /&gt;Charles Cook: &lt;a href="http://www.cookcomputing.com/blog/archives/000425.html"&gt;http://www.cookcomputing.com/blog/archives/000425.html&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="14.4"&gt;14.4 What's new in the .NET 2.0 class library?&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Here is a selection of new features in the .NET 2.0 class library:&lt;/p&gt;&lt;ul&gt;&lt;li&gt; Generic collections in the System.Collections.Generic namespace.&lt;/li&gt;&lt;li&gt; The &lt;b&gt;System.Nullable&lt;t&gt;&lt;/b&gt; type. (Note that C# has special syntax for this type, e.g. int? is equivalent to Nullable&lt;int&gt;)&lt;/li&gt;&lt;li&gt; The &lt;b&gt;GZipStream&lt;/b&gt; and &lt;b&gt;DeflateStream&lt;/b&gt; classes in the System.IO.Compression namespace.&lt;/li&gt;&lt;li&gt; The &lt;b&gt;Semaphore&lt;/b&gt; class in the System.Threading namespace.&lt;/li&gt;&lt;li&gt; Wrappers for DPAPI in the form of the &lt;b&gt;ProtectedData&lt;/b&gt; and &lt;b&gt;ProtectedMemory&lt;/b&gt; classes in the System.Security.Cryptography namespace.&lt;/li&gt;&lt;li&gt; The IPC remoting channel in the System.Runtime.Remoting.Channels.Ipc namespace, for optimised intra-machine communication.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;and many, many more. See &lt;a href="http://msdn2.microsoft.com/en-us/library/t357fb32%28en-US,VS.80%29.aspx"&gt;http://msdn2.microsoft.com/en-us/library/t357fb32(en-US,VS.80).aspx&lt;/a&gt; for a comprehensive list of changes.&lt;/p&gt;  &lt;h2&gt;&lt;a name="15."&gt;15. Resources&lt;/a&gt;&lt;/h2&gt;   &lt;h3&gt;&lt;a name="15.1"&gt;15.1 Recommended books&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;I recommend the following books, either because I personally like them, or because I think they are well regarded by other .NET developers. (Note that I get a commission from Amazon if you buy a book after following one of these links.)&lt;/p&gt;&lt;ul&gt;&lt;li&gt; &lt;a href="http://www.amazon.com/exec/obidos/ASIN/1590594193/ref=nosim/andymcmullsho-20"&gt;Pro C# 2005 and the .NET 2.0 Platform, 3nd Edition - Andrew Troelsen&lt;/a&gt;&lt;br /&gt;Regarded by many as the best all round C#/.NET book. Wide coverage including Windows Forms, COM interop, ADO.NET, ASP.NET etc.&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.amazon.com/exec/obidos/ASIN/0735621632/ref=nosim/andymcmullsho-20"&gt;CLR via C#&lt;/a&gt; is the .NET 2.0 version of Jeffrey Richter's acclaimed &lt;a href="http://www.amazon.com/exec/obidos/ASIN/0735614229/ref=nosim/andymcmullsho-20"&gt;Applied Microsoft .NET Framework Programming&lt;/a&gt; book.&lt;br /&gt;Despite the 'applied' in the original title, these books are mostly about how the .NET Framework works 'under the hood'. Examples are in C#.&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.amazon.com/exec/obidos/ASIN/0201734117/ref=nosim/andymcmullsho-20"&gt;Essential .NET Volume 1, The Common Language Runtime - Don Box&lt;/a&gt;&lt;br /&gt;A superb book, which I recommend to anyone who already has some .NET development experience, and wants to get a deeper understanding of CLR fundamentals. It's clear that Box has deeply researched the topics and then carefully constructed a coherent story around his findings. It's rare to find such craft in a.NET text.&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.amazon.com/exec/obidos/ASIN/0321267966/ref=nosim/andymcmullsho-20"&gt;Windows Forms 2.0 Programming (2nd Edition) - Chris Sells &amp; Mike Weinhardt&lt;/a&gt;&lt;br /&gt;Anything Sells writes is usually worth reading.&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.amazon.com/exec/obidos/ASIN/067232170X/ref=nosim/andymcmullsho-20"&gt;.NET and COM - The Complete Interoperability Guide - Adam Nathan&lt;/a&gt;&lt;br /&gt;Don't be put off by the size - this book is very easy to digest thanks to the superb writing style. The bible of .NET/COM interop.&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.amazon.com/exec/obidos/ASIN/1590594177/ref=nosim/andymcmullsho-20"&gt;Advanced .NET Remoting, Second Edition - Ingo Rammer &amp;amp; Mario Szpuszta&lt;/a&gt;&lt;br /&gt;Widely recommended.&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.amazon.com/exec/obidos/ASIN/1590594967/ref=nosim/andymcmullsho-20"&gt;Pro ASP.NET 2.0 in C# 2005 - Matthew MacDonald and Mario Szpuszta&lt;/a&gt;.&lt;br /&gt;Well written and comprehensive coverage of ASP.NET. Ideal for those who already have some web development experience - complete beginners may be better off with a more introductory text.&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.amazon.com/exec/obidos/ASIN/1590595122/ref=nosim/andymcmullsho-20"&gt;Pro ADO.NET 2.0 - Sahil Malik&lt;/a&gt;.&lt;br /&gt;Good ADO.NET text, though I found the best practices chapter a little disappointing, and the duplication of code samples (VB.NET &amp;amp; C# versions) is a waste of space.&lt;/li&gt;&lt;/ul&gt;  &lt;h3&gt;&lt;a name="15.2"&gt;15.2 Web sites&lt;/a&gt;&lt;/h3&gt; &lt;ul&gt;&lt;li&gt; The Microsoft .NET homepage is at  &lt;a href="http://www.microsoft.com/net/"&gt;http://www.microsoft.com/net/&lt;/a&gt;. Microsoft also host  &lt;a href="http://www.gotdotnet.com/"&gt;GOTDOTNET&lt;/a&gt;.&lt;/li&gt;&lt;li&gt; Chris Sells has a great set of &lt;a href="http://www.sellsbrothers.com/links/#manlinks"&gt;.NET links&lt;/a&gt;.&lt;/li&gt;&lt;li&gt; microsoft.public.dotnet.* newsgroups&lt;/li&gt;&lt;li&gt; Syncfusion &lt;a href="http://www.syncfusion.com/FAQ/WinForms/"&gt;Winforms FAQ&lt;/a&gt;.&lt;/li&gt;&lt;li&gt; Ingo Rammer's &lt;a href="http://www.thinktecture.com/Resources/RemotingFAQ/default.html"&gt;.NET Remoting FAQ&lt;/a&gt;.&lt;/li&gt;&lt;li&gt; DevX host the &lt;a href="http://www.devx.com/dotnet/"&gt;.NET Zone&lt;/a&gt;.&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.cetus-links.org/oo_dotnet.html"&gt;http://www.cetus-links.org/oo_dotnet.html&lt;/a&gt; is a superb set of links to .NET resources.&lt;/li&gt;&lt;li&gt; My &lt;a href="http://www.andymcm.com/csharpfaq.htm"&gt;C# FAQ for C++ Programmers&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;  &lt;h3&gt;&lt;a name="15.3"&gt;15.3 Blogs&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;The following Weblogs ('blogs') have regular .NET content:&lt;/p&gt;&lt;ul&gt;&lt;li&gt; &lt;a href="http://dotnetguy.techieswithcats.com/"&gt;The .NET Guy&lt;/a&gt; (Brad Wilson)&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.sellsbrothers.com/"&gt;Chris Sells&lt;/a&gt;&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.cookcomputing.com/"&gt;Charles Cook&lt;/a&gt;: Developer of XML-RPC.NET.&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.gwyncole.com/"&gt;Gwyn Cole&lt;/a&gt;: Co-author of Developing WMI solutions.&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.interact-sw.co.uk/iangblog/"&gt;Ian Griffiths&lt;/a&gt;&lt;/li&gt;&lt;li&gt; &lt;a href="http://blogs.gotdotnet.com/cbrumme/"&gt;Chris Brumme&lt;/a&gt;&lt;/li&gt;&lt;li&gt; &lt;a href="http://blogs.gotdotnet.com/BradA/"&gt;Brad Abrams&lt;/a&gt;&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.pluralsight.com/blogs/dbox/"&gt;Don Box&lt;/a&gt;&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.iunknown.com/"&gt;John Lam&lt;/a&gt;&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.dotnetremoting.cc/DotNetCentric/"&gt;Ingo Rammer&lt;/a&gt;: Author of Advanced .NET remoting.&lt;/li&gt;&lt;li&gt; &lt;a href="http://radio.weblogs.com/0104813/"&gt;Drew Marsh&lt;/a&gt;&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.pocketsoap.com/weblog/"&gt;Simon Fell&lt;/a&gt;: Developer of PocketSOAP.&lt;/li&gt;&lt;/ul&gt;  &lt;h3&gt;&lt;a name="15.4"&gt;15.4 Free tools&lt;/a&gt;&lt;/h3&gt; &lt;ul&gt;&lt;li&gt; Lutz Roeder's &lt;a href="http://www.aisto.com/roeder/dotnet/"&gt;Reflector&lt;/a&gt;&lt;/li&gt;&lt;li&gt; Adam Nathan's &lt;a href="http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=c7b955c7-231a-406c-9fa5-ad09ef3bb37f"&gt;clrspy&lt;/a&gt;&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=36A3E666-6877-4C26-B62D-BFD7CB3154AC"&gt;Allocation Profiler&lt;/a&gt;&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.gotdotnet.com/team/fxcop/"&gt;FXCop&lt;/a&gt;&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.nunit.org/"&gt;NUnit&lt;/a&gt;&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=MSE"&gt;Managed stack explorer&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7468658770095272063-8528791183968755588?l=dotnet786.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnet786.blogspot.com/feeds/8528791183968755588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7468658770095272063&amp;postID=8528791183968755588' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/8528791183968755588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/8528791183968755588'/><link rel='alternate' type='text/html' href='http://dotnet786.blogspot.com/2007/05/dotnet-faqs.html' title='Dotnet faqs'/><author><name>prashanth</name><uri>http://www.blogger.com/profile/07711599595106933499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7468658770095272063.post-58032562376314946</id><published>2007-05-30T10:29:00.000-07:00</published><updated>2007-05-30T10:33:26.422-07:00</updated><title type='text'>.NET And Asp .Net Interview Questions And Answers</title><content type='html'>&lt;p&gt; &lt;b&gt;&lt;u&gt;&lt;span style="color: rgb(0, 0, 255);"&gt; &lt;span class="for_questions_blue"&gt;How many languages .NET is supporting now?&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span class="answers"&gt;When .NET was introduced it came with several languages.  VB.NET, C#, COBOL and Perl, etc. 44 languages are  supported. &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;How is .NET able to support multiple languages?&lt;/u&gt;&lt;/span&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;A language should comply with the Common Language  Runtime standard to become a .NET language. In .NET,  code is compiled to Microsoft Intermediate Language (MSIL  for short). This is called as Managed Code. This Managed  code is run in .NET environment. So after compilation to  this IL the language is not a barrier. A code can call  or use a function written in another language. &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;How ASP .NET different from ASP?&lt;/u&gt;&lt;/span&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Scripting is separated from the HTML, Code is compiled  as a DLL, these DLLs can be executed on the server.  &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;What is smart navigation? &lt;/u&gt; &lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;The cursor position is maintained when the page gets  refreshed due to the server side validation and the page  gets refreshed. &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;What is view state? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;The web is stateless. But in ASP.NET, the state of a  page is maintained in the in the page itself  automatically. How? The values are encrypted and saved  in hidden controls. this is done automatically by the  ASP.NET. This can be switched off / on for a single  control &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;How do you validate the controls in an ASP .NET page? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Using special validation controls that are meant for  this. We have Range Validator, Email Validator. &lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt; &lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;Can the validation be done in the server side? Or this  can be done only in the Client side? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Client side is done by default. Server side validation  is also possible. We can switch off the client side and  server side can be done. &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;How to manage pagination in a page?  &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Using pagination option in DataGrid control. We have to  set the number of records for a page, then it takes care  of pagination by itself. &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;What is ADO .NET and what is difference between ADO and  ADO.NET? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;ADO.NET is stateless mechanism. I can treat the ADO.Net  as a separate in-memory database where in I can use  relationships between the tables and select insert and  updates to the database. I can update the actual  database as a batch.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt; &lt;u&gt;Explain the differences between Server-side and  Client-side code?&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;!--webbot bot="Include" U-Include="_private/tble_firefox.htm" TAG="BODY" startspan --&gt;  &lt;table class="tblggl3" align="right" height="141" width="300"&gt; &lt;tbody&gt;&lt;tr&gt; &lt;td&gt; &lt;p align="center"&gt;&lt;i&gt;&lt;span style="color: rgb(255, 0, 0);font-family:Arial;" &gt;&lt;u&gt;&lt;b&gt;Security Tip&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="tblggl4"  style="font-family:Times New Roman;"&gt;Use &lt;strong&gt;Firefox&lt;/strong&gt; instead of Internet  Explorer and &lt;strong&gt;PREVENT Spyware&lt;/strong&gt; !&lt;/span&gt;&lt;/p&gt; &lt;p align="center"&gt;&lt;script type="text/javascript"&gt;&lt;!-- google_ad_client = "pub-7003540323320880"; google_ad_width = 125; google_ad_height = 125; google_ad_format = "125x125_as_rimg"; google_cpa_choice = "CAAQyf6XhAIaCI9aHswlZ6VKKK2293M"; google_ad_channel = "6386700170"; //--&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt; &lt;/script&gt;&lt;iframe name="google_ads_frame" src="http://pagead2.googlesyndication.com/cpa/ads?client=ca-pub-7003540323320880&amp;cpa_choice=CAAQyf6XhAIaCI9aHswlZ6VKKK2293M&amp;amp;oe=windows-1252&amp;dt=1180545174437&amp;amp;lmt=1180094043&amp;format=125x125_as_rimg&amp;amp;amp;output=html&amp;correlator=1180545173734&amp;amp;channel=6386700170&amp;url=http%3A%2F%2Ftechpreparation.com%2Faspdotnet-intervew-questions1.htm&amp;amp;region=_google_cpa_region_&amp;ref=http%3A%2F%2Ftechpreparation.com%2Finterview-questions.htm&amp;amp;cc=51&amp;flash=9&amp;amp;amp;u_h=768&amp;u_w=1024&amp;amp;u_ah=738&amp;u_aw=1024&amp;amp;u_cd=32&amp;u_tz=330&amp;amp;u_his=3&amp;u_java=true&amp;amp;u_nplug=23&amp;u_nmime=91" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" frameborder="0" height="125" scrolling="no" width="125"&gt;&lt;/iframe&gt;&lt;/p&gt; &lt;p&gt;&lt;b&gt;&lt;span class="tblggl4"&gt;Firefox&lt;/span&gt;&lt;/b&gt;&lt;span class="tblggl4"&gt; is &lt;b&gt;free&lt;/b&gt; and is considered the &lt;b&gt;best free&lt;/b&gt;, &lt;b&gt;safe web browser &lt;/b&gt;available today &lt;/span&gt; &lt;script type="text/javascript"&gt;&lt;!-- google_ad_client = "pub-7003540323320880"; google_ad_output = "textlink"; google_ad_format = "ref_text"; google_cpa_choice = "CAAQhaT2_gEaCAS0i9mxCgAgKLGsuIEB"; google_ad_channel = "0030826239"; //--&gt; &lt;/script&gt; &lt;script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt; &lt;/script&gt;&lt;script language="JavaScript1.1" src="http://pagead2.googlesyndication.com/cpa/ads?client=ca-pub-7003540323320880&amp;cpa_choice=CAAQhaT2_gEaCAS0i9mxCgAgKLGsuIEB&amp;amp;oe=windows-1252&amp;dt=1180545174453&amp;amp;lmt=1180094043&amp;prev_fmts=125x125_as_rimg&amp;amp;amp;format=ref_text&amp;output=textlink&amp;amp;correlator=1180545173734&amp;channel=0030826239&amp;amp;url=http%3A%2F%2Ftechpreparation.com%2Faspdotnet-intervew-questions1.htm&amp;region=_google_cpa_region_&amp;amp;ref=http%3A%2F%2Ftechpreparation.com%2Finterview-questions.htm&amp;cc=46&amp;amp;flash=9&amp;u_h=768&amp;amp;amp;u_w=1024&amp;u_ah=738&amp;amp;u_aw=1024&amp;u_cd=32&amp;amp;u_tz=330&amp;u_his=3&amp;amp;amp;u_java=true&amp;u_nplug=23&amp;amp;u_nmime=91"&gt;&lt;/script&gt;&lt;a href="http://pagead2.googlesyndication.com/pagead/iclk?sa=l&amp;num=0&amp;amp;client=ca-ref-pub-7003540323320880&amp;adurl=http://tools.google.com/firefox/toolbar/bundle/%3Fai%3DBwcc1pbBdRtQMmKSyAr6E6JQD0Z7yF4Wk9v4BxY23AQAQASCt8dcGOAFQ4d3zZGDlkuiD2A6gAbWVyP0DqgEKMDAzMDgyNjIzObIBE3RlY2hwcmVwYXJhdGlvbi5jb23IAQHaATxodHRwOi8vdGVjaHByZXBhcmF0aW9uLmNvbS9hc3Bkb3RuZXQtaW50ZXJ2ZXctcXVlc3Rpb25zMS5odG3gAQKAAgGoAwM&amp;amp;ai=Br8pXpbBdRtQMmKSyAr6E6JQD0Z7yF4Wk9v4BxY23AQAQASCt8dcGOAFQta7g7QNg5ZLog9gOoAG1lcj9A6oBCjAwMzA4MjYyMzmyARN0ZWNocHJlcGFyYXRpb24uY29tyAEB2gE8aHR0cDovL3RlY2hwcmVwYXJhdGlvbi5jb20vYXNwZG90bmV0LWludGVydmV3LXF1ZXN0aW9uczEuaHRt4AECgAIBqAMD" title="Ads by Google"&gt;Get Firefox with Google Toolbar for better browsing&lt;/a&gt;&lt;/p&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;!--webbot bot="Include" i-checksum="47638" endspan --&gt;&lt;p&gt; &lt;span class="answers"&gt;Server side scripting means that all the script will be  executed by the server and interpreted as needed. ASP  doesn’t have some of the functionality like sockets,  uploading, etc. For these you have to make a custom  components usually in VB or VC++. Client side scripting  means that the script will be executed immediately in  the browser such as form field validation, clock, email  validation, etc. Client side scripting is usually done  in VBScript or JavaScript. Download time, browser  compatibility, and visible code - since JavaScript and  VBScript code is included in the HTML page, then anyone  can see the code by viewing the page source. Also a  possible security hazards for the client computer.  &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;What type of code (server or client) is found in a  Code-Behind class? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;C# &lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;b&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;&lt;span class="for_questions_blue"&gt;Should validation (did the user enter a real date) occur  server-side or client-side? Why?&lt;/span&gt; &lt;/u&gt;&lt;/span&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Client-side validation because there is no need to  request a server side date when you could obtain a date  from the client machine. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;What does the "EnableViewState" property do? Why would I  want it on or off? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Enable ViewState turns on the automatic state management  feature that enables server controls to re-populate  their values on a round trip without requiring you to  write any code. This feature is not free however, since  the state of a control is passed to and from the server  in a hidden form field. You should be aware of when  ViewState is helping you and when it is not. For  example, if you are binding a control to data on every  round trip (as in the datagrid example in tip #4), then  you do not need the control to maintain it’s view state,  since you will wipe out any re-populated data in any  case. ViewState is enabled for all server controls by  default. To disable it, set the EnableViewState property  of the control to false. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;What is the difference between Server.Transfer and  Response.Redirect? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Why would I choose one over the other? Server.Transfer()  : client is shown as it is on the requesting page only,  but the all the content is of the requested page. Data  can be persist across the pages using Context.Item  collection, which is one of the best way to transfer  data from one page to another keeping the page state  alive. Response.Dedirect() :client know the physical  location (page name and query string as well).  Context.Items loses the persistence when navigate to  destination page. In earlier versions of IIS, if we  wanted to send a user to a new Web page, the only option  we had was Response.Redirect. While this method does  accomplish our goal, it has several important drawbacks.  The biggest problem is that this method causes each page  to be treated as a separate transaction. Besides making  it difficult to maintain your transactional integrity,  Response.Redirect introduces some additional headaches.  First, it prevents good encapsulation of code. Second,  you lose access to all of the properties in the Request  object. Sure, there are workarounds, but they’re  difficult. Finally, Response.Redirect necessitates a  round trip to the client, which, on high-volume sites,  causes scalability problems. As you might suspect,  Server.Transfer fixes all of these problems. It does  this by performing the transfer on the server without  requiring a roundtrip to the client. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;Can you give an example of when it would be appropriate  to use a web service as opposed to a non-serviced .NET  component? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;When to Use Web Services:&lt;br /&gt;* Communicating through a Firewall When building a  distributed application with 100s/1000s of users spread  over multiple locations, there is always the problem of  communicating between client and server because of  firewalls and proxy servers. Exposing your middle tier  components as Web Services and invoking the directly  from a Windows UI is a very valid option.&lt;br /&gt;&lt;br /&gt;* Application Integration When integrating applications  written in various languages and running on disparate  systems. Or even applications running on the same  platform that have been written by separate vendors.&lt;br /&gt;&lt;br /&gt;* Business-to-Business Integration This is an enabler  for B2B integration which allows one to expose vital  business processes to authorized supplier and customers.  An example would be exposing electronic ordering and  invoicing, allowing customers to send you purchase  orders and suppliers to send you invoices  electronically.&lt;br /&gt;&lt;br /&gt;* Software Reuse This takes place at multiple levels.  Code Reuse at the Source code level or binary component-based  reuse. The limiting factor here is that you can reuse  the code but not the data behind it. Webservice overcome  this limitation. A scenario could be when you are  building an app that aggregates the functionality of  several other Applications. Each of these functions  could be performed by individual apps, but there is  value in perhaps combining the multiple apps to  present a unified view in a Portal or Intranet.&lt;br /&gt;&lt;br /&gt;* When not to use Web Services: Single machine  Applications When the apps are running on the same  machine and need to communicate with each other use a  native API. You also have the options of using component  technologies such as COM or .NET Components as there is  very little overhead.&lt;br /&gt;&lt;br /&gt;* Homogeneous Applications on a LAN If you have Win32 or  Winforms apps that want to communicate to their server  counterpart. It is much more efficient to use DCOM in  the case of Win32 apps and .NET Remoting in the case of  .NET Apps.&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;span class="for_questions_blue" style="color: rgb(255, 0, 0);"&gt;&lt;u&gt; &lt;b&gt;Can you explain the difference between an ADO.NET  Dataset and an ADO Recordset?&lt;span class="answers"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;span class="answers"&gt;In ADO, the in-memory representation of data is the  RecordSet. In ADO.NET, it is the dataset. There are  important differences between them.&lt;br /&gt;&lt;br /&gt;* A RecordSet looks like a single table. If a recordset  is to contain data from multiple database tables, it  must use a JOIN query, which assembles the data from the  various database tables into a single result table. In  contrast, a dataset is a collection of one or more  tables. The tables within a dataset are called data  tables; specifically, they are DataTable objects. If a  dataset contains data from multiple database tables, it  will typically contain multiple DataTable objects. That  is, each DataTable object typically corresponds to a  single database table or view. In this way, a dataset  can mimic the structure of the underlying database. A  dataset usually also contains relationships. A  relationship within a dataset is analogous to a  foreign-key relationship in a database —that is, it  associates rows of the tables with each other. For  example, if a dataset contains a table about investors  and another table about each investor’s stock purchases,  it could also contain a relationship connecting each row  of the investor table with the corresponding rows of the  purchase table. Because the dataset can hold multiple,  separate tables and maintain information about  relationships between them, it can hold much richer data  structures than a recordset, including self-relating  tables and tables with many-to-many relationships.&lt;br /&gt;&lt;br /&gt;* In ADO you scan sequentially through the rows of the  recordset using the ADO MoveNext method. In ADO.NET,  rows are represented as collections, so you can loop  through a table as you would through any collection, or  access particular rows via ordinal or primary key index.  DataRelation objects maintain information about master  and detail records and provide a method that allows you  to get records related to the one you are working with.  For example, starting from the row of the Investor table  for "Nate Sun," you can navigate to the set of rows of  the Purchase table describing his purchases. A cursor is  a database element that controls record navigation, the  ability to update data, and the visibility of changes  made to the database by other users. ADO.NET does not  have an inherent cursor object, but instead includes  data classes that provide the functionality of a  traditional cursor. For example, the functionality of a  forward-only, read-only cursor is available in the  ADO.NET DataReader object. For more information about  cursor functionality, see Data Access Technologies.&lt;br /&gt;&lt;br /&gt;* Minimized Open Connections: In ADO.NET you open  connections only long enough to perform a database  operation, such as a Select or Update. You can read rows  into a dataset and then work with them without staying  connected to the data source. In ADO the recordset can  provide disconnected access, but ADO is designed  primarily for connected access. There is one significant  difference between disconnected processing in ADO and  ADO.NET. In ADO you communicate with the database by  making calls to an OLE DB provider. In ADO.NET you  communicate with the database through a data adapter (an  OleDbDataAdapter, SqlDataAdapter, OdbcDataAdapter, or  OracleDataAdapter object), which makes calls to an OLE  DB provider or the APIs provided by the underlying data  source. The important difference is that in ADO.NET the  data adapter allows you to control how the changes to  the dataset are transmitted to the database — by  optimizing for performance, performing data validation  checks, or adding any other extra processing. Data  adapters, data connections, data commands, and data  readers are the components that make up a .NET Framework  data provider. Microsoft and third-party providers can  make available other .NET Framework data providers that  can be integrated into Visual Studio.&lt;br /&gt;&lt;br /&gt;* Sharing Data Between Applications. Transmitting an  ADO.NET dataset between applications is much easier than  transmitting an ADO disconnected recordset. To transmit  an ADO disconnected recordset from one component to  another, you use COM marshalling. To transmit data in  ADO.NET, you use a dataset, which can transmit an XML  stream.&lt;br /&gt;&lt;br /&gt;* Richer data types.COM marshalling provides a limited  set of data types — those defined by the COM standard.  Because the transmission of datasets in ADO.NET is based  on an XML format, there is no restriction on data types.  Thus, the components sharing the dataset can use  whatever rich set of data types they would ordinarily  use.&lt;br /&gt;&lt;br /&gt;* Performance. Transmitting a large ADO recordset or a  large ADO.NET dataset can consume network resources; as  the amount of data grows, the stress placed on the  network also rises. Both ADO and ADO.NET let you  minimize which data is transmitted. But ADO.NET offers  another performance advantage, in that ADO.NET does not  require data-type conversions. ADO, which requires COM  marshalling to transmit records sets among components,  does require that ADO data types be converted to COM  data types.&lt;br /&gt;&lt;br /&gt;* Penetrating Firewalls.A firewall can interfere with  two components trying to transmit disconnected ADO  recordsets. Remember, firewalls are typically configured  to allow HTML text to pass, but to prevent system-level  requests (such as COM marshalling) from passing.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;u&gt;Can you give an example of what might be best suited to  place in the Application_Start and Session_Start  subroutines?&lt;/u&gt;&lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;The Application_Start event is guaranteed to occur only  once throughout the lifetime of the application. It’s a  good place to initialize global variables. For example,  you might want to retrieve a list of products from a  database table and place the list in application state  or the Cache object. SessionStateModule exposes both  Session_Start and Session_End events.&lt;br /&gt;&lt;br /&gt;If I’m developing an application that must accomodate  multiple security levels though secure login and my  ASP.NET web appplication is spanned across three  web-servers (using round-robbin load balancing) what  would be the best approach to maintain login-in state  for the users? &lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;u&gt;What are ASP.NET Web Forms? How is this technology  different than what is available though ASP? &lt;/u&gt; &lt;/b&gt; &lt;/p&gt; &lt;!--webbot bot="Include" U-Include="../_private/tbl_gglapck.htm" TAG="BODY" startspan --&gt;  &lt;table class="tblggl2" align="right" height="180" width="300"&gt; &lt;tbody&gt;&lt;tr&gt; &lt;td&gt; &lt;p align="center"&gt;&lt;span style="color: rgb(255, 0, 0);font-size:130%;" &gt;&lt;i&gt;&lt;u&gt;&lt;b&gt;Security Issue &lt;/b&gt;&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="tblggl1"&gt;Get &lt;strong&gt;Norton Security Scan&lt;/strong&gt; and &lt;strong&gt;Spyware Doctor free&lt;/strong&gt; for your Computer from Google.&lt;/span&gt;&lt;/p&gt; &lt;p align="center"&gt;&lt;script type="text/javascript"&gt;&lt;!-- google_ad_client = "pub-7003540323320880"; google_ad_width = 125; google_ad_height = 125; google_ad_format = "125x125_as_rimg"; google_cpa_choice = "CAAQ4L6kgwIaCAyrZSIvxiZcKJDD4IEB"; google_ad_channel = "7725301200"; //--&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt; &lt;/script&gt;&lt;iframe name="google_ads_frame" src="http://pagead2.googlesyndication.com/cpa/ads?client=ca-pub-7003540323320880&amp;cpa_choice=CAAQ4L6kgwIaCAyrZSIvxiZcKJDD4IEB&amp;amp;oe=windows-1252&amp;dt=1180546225687&amp;amp;lmt=1180094038&amp;format=125x125_as_rimg&amp;amp;amp;output=html&amp;correlator=1180546221609&amp;amp;channel=7725301200&amp;url=http%3A%2F%2Ftechpreparation.com%2Fcomputer-interview-questions%2Faspdotnet-interview-questions2.htm&amp;amp;region=_google_cpa_region_&amp;ref=http%3A%2F%2Ftechpreparation.com%2Faspdotnet-intervew-questions1.htm&amp;amp;cc=32&amp;flash=9&amp;amp;amp;u_h=768&amp;u_w=1024&amp;amp;u_ah=738&amp;u_aw=1024&amp;amp;u_cd=32&amp;u_tz=330&amp;amp;u_his=4&amp;u_java=true&amp;amp;u_nplug=23&amp;u_nmime=91" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" frameborder="0" height="125" scrolling="no" width="125"&gt;&lt;/iframe&gt;&lt;/p&gt; &lt;p align="left"&gt;&lt;span class="tblggl1"&gt;The Pack contains nearly &lt;b&gt;14 plus software&lt;/b&gt; . Pick  the one which is suited for you &lt;/span&gt; &lt;script type="text/javascript"&gt;&lt;!-- google_ad_client = "pub-7003540323320880"; google_ad_output = "textlink"; google_ad_format = "ref_text"; google_cpa_choice = "CAAQnLirggIaCFQiKZMX1ZjAKOCHu4UB"; google_ad_channel = "2345983004"; //--&gt; &lt;/script&gt; &lt;script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt; &lt;/script&gt;&lt;script language="JavaScript1.1" src="http://pagead2.googlesyndication.com/cpa/ads?client=ca-pub-7003540323320880&amp;cpa_choice=CAAQnLirggIaCFQiKZMX1ZjAKOCHu4UB&amp;amp;oe=windows-1252&amp;dt=1180546225718&amp;amp;lmt=1180094038&amp;prev_fmts=125x125_as_rimg&amp;amp;amp;format=ref_text&amp;output=textlink&amp;amp;correlator=1180546221609&amp;channel=2345983004&amp;amp;url=http%3A%2F%2Ftechpreparation.com%2Fcomputer-interview-questions%2Faspdotnet-interview-questions2.htm&amp;region=_google_cpa_region_&amp;amp;ref=http%3A%2F%2Ftechpreparation.com%2Faspdotnet-intervew-questions1.htm&amp;cc=31&amp;amp;flash=9&amp;u_h=768&amp;amp;amp;u_w=1024&amp;u_ah=738&amp;amp;u_aw=1024&amp;u_cd=32&amp;amp;u_tz=330&amp;u_his=4&amp;amp;amp;u_java=true&amp;u_nplug=23&amp;amp;u_nmime=91"&gt;&lt;/script&gt;&lt;a href="http://pagead2.googlesyndication.com/pagead/iclk?sa=l&amp;num=0&amp;amp;amp;ggladgrp=279888864&amp;gglcreat=452293644&amp;amp;client=ca-ref-pub-7003540323320880&amp;adurl=http://pack.google.com/%3Fai%3DBENGPvrRdRsGTBoyosgKNmZW0AuzuhSGcuKuCAsWNtwEAEAEgrfHXBjgBUIfas8sEYOWS6IPYDqABlpec_QOqAQoyMzQ1OTgzMDA0sgETdGVjaHByZXBhcmF0aW9uLmNvbcgBAdoBWmh0dHA6Ly90ZWNocHJlcGFyYXRpb24uY29tL2NvbXB1dGVyLWludGVydmlldy1xdWVzdGlvbnMvYXNwZG90bmV0LWludGVydmlldy1xdWVzdGlvbnMyLmh0beABAoACAagDAw&amp;amp;ai=B5k2gvrRdRsGTBoyosgKNmZW0AuzuhSGcuKuCAsWNtwEAEAEgrfHXBjgBUOu86sH______wFg5ZLog9gOoAGWl5z9A6oBCjIzNDU5ODMwMDSyARN0ZWNocHJlcGFyYXRpb24uY29tyAEB2gFaaHR0cDovL3RlY2hwcmVwYXJhdGlvbi5jb20vY29tcHV0ZXItaW50ZXJ2aWV3LXF1ZXN0aW9ucy9hc3Bkb3RuZXQtaW50ZXJ2aWV3LXF1ZXN0aW9uczIuaHRt4AECgAIBqAMD" title="Ads by Google"&gt;Make your PC more useful. Get the free Google Pack.&lt;/a&gt;&lt;/p&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;!--webbot bot="Include" i-checksum="45405" endspan --&gt;&lt;p&gt; &lt;span class="answers"&gt;Web Forms are the heart and soul of ASP.NET. Web Forms  are the User Interface (UI) elements that give your Web  applications their look and feel. Web Forms are similar  to Windows Forms in that they provide properties,  methods, and events for the controls that are placed  onto them. However, these UI elements render themselves  in the appropriate markup language required by the  request, e.g. HTML. If you use Microsoft Visual Studio  .NET, you will also get the familiar drag-and-drop  interface used to create your UI for your Web  application. &lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;u&gt;How does VB.NET/C# achieve polymorphism?&lt;/u&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;By using Abstract classes/functions.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;u&gt;Can you explain what inheritance is and an example of  when you might use it? &lt;/u&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Inheritance is a fundamental feature of an object  oriented system and it is simply the ability to inherit  data and functionality from a parent object. Rather than  developing new objects from scratch, new code can be  based on the work of other programmers, adding only new  features that are needed. &lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;u&gt;How would you implement inheritance using VB.NET/C#?  &lt;/u&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;When we set out to implement a class using inheritance,  we must first start with an existing class from which we  will derive our new subclass. This existing class, or  base class, may be part of the .NET system class library  framework, it may be part of some other application or  .NET assembly, or we may create it as part of our  existing application. Once we have a base class, we can  then implement one or more subclasses based on that base  class. Each of our subclasses will automatically have  all of the methods, properties, and events of that base  class ? including the implementation behind each method,  property, and event. Our subclass can add new methods,  properties, and events of its own - extending the  original interface with new functionality. Additionally,  a subclass can replace the methods and properties of the  base class with its own new implementation - effectively  overriding the original behavior and replacing it with  new behaviors. Essentially inheritance is a way of  merging functionality from an existing class into our  new subclass. Inheritance also defines rules for how  these methods, properties, and events can be merged.  &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;u&gt;What's an assembly?&lt;/u&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Assemblies are the building blocks of .NET Framework  applications; they form the fundamental unit of  deployment, version control, reuse, activation scoping,  and security permissions. An assembly is a collection of  types and resources that are built to work together and  form a logical unit of functionality. An assembly  provides the common language runtime with the  information it needs to be aware of type  implementations. To the runtime, a type does not exist  outside the context of an assembly. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;u&gt;Describe the difference between inline and code behind -  which is best in a loosely coupled solution? &lt;/u&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;ASP.NET supports two modes of page development: Page  logic code that is written inside &lt;script runat="server"&gt;  blocks within an .aspx file and dynamically compiled the  first time the page is requested on the server. Page  logic code that is written within an external class that  is compiled prior to deployment on a server and linked  "behind" the .aspx file at run time.&lt;/span&gt; &lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;u&gt;Explain what a diffgram is, and a good use for one? &lt;/u&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;A DiffGram is an XML format that is used to identify  current and original versions of data elements. The  DataSet uses the DiffGram format to load and persist its  contents, and to serialize its contents for transport  across a network connection. When a DataSet is written  as a DiffGram, it populates the DiffGram with all the  necessary information to accurately recreate the  contents, though not the schema, of the DataSet,  including column values from both the Original and  Current row versions, row error information, and row  order. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;u&gt;Where would you use an iHTTPModule, and what are the  limitations of anyapproach you might take in  implementing one? &lt;/u&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;One of ASP.NET’s most useful features is the  extensibility of the HTTP pipeline, the path that data  takes between client and server. You can use them to  extend your ASP.NET applications by adding pre- and  post-processing to each HTTP request coming into your  application. For example, if you wanted custom  authentication facilities for your application, the best  technique would be to intercept the request when it  comes in and process the request in a custom HTTP  module. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;u&gt;In what order do the events of an ASPX page execute. As  a developer is it important to understand these events? &lt;/u&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Every Page object (which your .aspx page is) has nine  events, most of which you will not have to worry about  in your day to day dealings with ASP.NET. The three that  you will deal with the most are: Page_Init, Page_Load,  Page_PreRender. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;u&gt;Which method do you invoke on the DataAdapter control to  load your generated dataset with data?&lt;/u&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;System.Data.Common.DataAdapter.Fill(System.Data.DataSet);&lt;br /&gt;If my DataAdapter is sqlDataAdapter and my DataSet is  dsUsers then it is called this way:&lt;br /&gt;sqlDataAdapter.Fill(dsUsers);&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b&gt;&lt;span style="color:#ff0000;"&gt;&lt;u&gt; &lt;span class="for_questions_blue"&gt;Which template must you provide, in order to display  data in a Repeater control?&lt;/span&gt; &lt;/u&gt;&lt;/span&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;ItemTemplate &lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;u&gt;How can you provide an alternating color scheme in a  Repeater control? &lt;/u&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;AlternatingItemTemplate Like the ItemTemplate element,  but rendered for every other row (alternating items) in  the Repeater control. You can specify a different  appearance for the AlternatingItemTemplate element by  setting its style properties. &lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;u&gt;What property must you set, and what method must you  call in your code, in order to bind the data from some  data source to the Repeater control?&lt;/u&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;You must set the DataMember property which Gets or sets  the specific table in the DataSource to bind to the  control and the DataBind method to bind data from a  source to a server control. This method is commonly used  after retrieving a data set through a database query. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;u&gt;What base class do all Web Forms inherit from?  &lt;/u&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;System.Web.UI.Page &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b&gt;&lt;span class="for_questions_blue"&gt;&lt;u&gt;What method do you use to explicitly kill a user’s  session?&lt;/u&gt; &lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;The Abandon method destroys all the objects stored in a  Session object and releases their resources.&lt;br /&gt;If you do not call the Abandon method explicitly, the  server destroys these objects when the session times  out.&lt;br /&gt;Syntax: Session.Abandon &lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;u&gt;How do you turn off cookies for one page in your site? &lt;/u&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Use the Cookie.Discard Property which Gets or sets the  discard flag set by the server. When true, this property  instructs the client application not to save the Cookie  on the user’s hard disk when a session ends. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;u&gt;Which two properties are on every validation control? &lt;/u&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;ControlToValidate &amp; ErrorMessage properties &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;u&gt;How do you create a permanent cookie?&lt;/u&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Setting the Expires property to MinValue means that the  Cookie never expires. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;u&gt;Which method do you use to redirect the user to another  page without performing a round trip to the client?&lt;/u&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Server.transfer()&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;b&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt; &lt;span class="for_questions_blue"&gt;What is the transport protocol you use to call a Web  service?&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="answers"&gt;Answer1:&lt;br /&gt;SOAP. Transport Protocols: It is essential for the  acceptance of Web Services that they are based on  established Internet infrastructure. This in fact  imposes the usage of of the HTTP, SMTP and FTP protocols  based on the TCP/IP family of transports. Messaging  Protocol: The format of messages exchanged between Web  Services clients and Web Services should be vendor  neutral and should not carry details about the  technology used to implement the service. Also, the  message format should allow for extensions and different  bindings to specific transport protocols. SOAP and ebXML  Transport are specifications which fulfill these  requirements. We expect that the W3C XML Protocol  Working Group defines a successor standard.&lt;br /&gt;&lt;br /&gt;Answer2:&lt;br /&gt;SOAP is not the transport protocol. SOAP is the data  encapsulation protocol that is used but the transport  protocol is fairly unlimited. Generally HTTP is the most  common transport protocol used though you could  conceivanly use things like SMTP or any others. SOAP is  not dependant on any single transport protocol or OS, it  is a syntactical and logical definition, not a transport  protocol. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;True or False: A Web service can only be written in  .NET.? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;False. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;What does WSDL stand for? &lt;/u&gt; &lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Web Services Description Language &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;Where on the Internet would you look for Web services? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;UDDI repositaries like uddi.microsoft.com, IBM UDDI  node, UDDI Registries in Google Directory, enthusiast  sites like XMethods.net. &lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;What tags do you need to add within the asp:datagrid  tags to bind columns manually? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Column tag and an ASP:databound tag. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b&gt;&lt;span class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;How is a property designated as read-only?&lt;/u&gt;&lt;/span&gt;  &lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;In VB.NET:&lt;br /&gt;Public ReadOnly Property PropertyName As ReturnType&lt;br /&gt;Get ‘Your Property Implementation goes in here&lt;br /&gt;End Get&lt;br /&gt;End Property&lt;br /&gt;&lt;br /&gt;in C#&lt;br /&gt;public returntype PropertyName&lt;br /&gt;&lt;/span&gt;{&lt;span class="answers"&gt;&lt;br /&gt;get{&lt;br /&gt;//property implementation goes here&lt;br /&gt;&lt;/span&gt;}&lt;span class="answers"&gt;&lt;br /&gt;// Do not write the set implementation&lt;br /&gt;} &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;Which control would you use if you needed to make sure  the values in two different controls matched? &lt;/u&gt; &lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Use the CompareValidator control to compare the values  of 2 different controls.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt; &lt;u&gt;True or False: To test a Web service you must create a  windows application or Web application to consume this  service? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;False. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;How many classes can a single .NET DLL contain?&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Unlimited. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;Describe session handling in a webfarm, how does it work  and what are the limits? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Set the sessionState mode in the web.config file to “StateServer”.&lt;br /&gt;StateServer mode uses an out-of-process Windows NT  Server to store state information.&lt;br /&gt;It solves the session state loss problem in InProc mode.&lt;br /&gt;Allows a webfarm to store session on a central server.&lt;br /&gt;It provides a Single point of failure at the State  Server.&lt;br /&gt;&lt;br /&gt;Follow these simple steps:&lt;br /&gt;- In a web farm, make sure you have the same in all your  web servers.&lt;br /&gt;- Also, make sure your objects are serializable.&lt;br /&gt;- For session state to be maintained across different  web servers in the web farm, the Application Path of the  website in the IIS Metabase should be identical in all  the web servers in the web farm.&lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;What are the disadvantages of viewstate/what are the  benefits? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Answer1:&lt;br /&gt;Disadvantage of viewstate is that additional data is  sent to the browser. The benefits are that you do not  have to manually manage refreshing the page fields after  a submit, (when re-displaying the same page).&lt;br /&gt;&lt;br /&gt;Answer2:&lt;br /&gt;Automatic view-state management is a feature of server  controls that enables them to repopulate their property  values on a round trip (without you having to write any  code). This feature does impact performance, however,  since a server control’s view state is passed to and  from the server in a hidden form field. You should be  aware of when view state helps you and when it hinders  your page’s performance. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;What tags do you need to add within the asp:datagrid  tags to bind columns manually? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Answer1:&lt;br /&gt;Set AutoGenerateColumns Property to false on the  datagrid tag&lt;br /&gt;&lt;br /&gt;Answer2:&lt;br /&gt;tag and either or tags (with appropriate attributes of  course) &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;What is State Management in .Net and how many ways are  there to maintain a state in .Net? What is view state? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Web pages are recreated each time the page is posted to  the server. In traditional Web programming, this would  ordinarily mean that all information associated with the  page and the controls on the page would be lost with  each round trip.&lt;br /&gt;To overcome this inherent limitation of traditional Web  programming, the ASP.NET page framework includes various  options to help you preserve changes — that is, for  managing state. The page framework includes a facility  called view state that automatically preserves property  values of the page and all the controls on it between  round trips.&lt;br /&gt;However, you will probably also have  application-specific values that you want to preserve.  To do so, you can use one of the state management  options.&lt;br /&gt;Client-Based State Management Options:&lt;br /&gt;View State&lt;br /&gt;Hidden Form Fields&lt;br /&gt;Cookies&lt;br /&gt;Query Strings&lt;br /&gt;Server-Based State Management Options&lt;br /&gt;Application State&lt;br /&gt;Session State&lt;br /&gt;Database Support&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt; &lt;u&gt;What tag do you use to add a hyperlink column to the  DataGrid? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Depends on who’s definition of hyperlink your using.  Manually a std html anchor tag (a) will work or you can  use the micro-magical tag &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;What is the standard you use to wrap up a call to a Web  service? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Several possible answers depending on your  interpretation of the quesiton, but I think you were  aiming for SOAP (with the caveat that this is MS’s  version of SOAP) &lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;What is the difference between boxing and unboxing ? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Boxing allows us to convert value types to reference  types. Basically, the runtime creates a temporary  reference-type box for the object on heap.&lt;br /&gt;Eg:&lt;br /&gt;int i=20;&lt;br /&gt;object o=i; &lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;Describe the difference between a Thread and a Process? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Answer1:&lt;br /&gt;Thread - is used to execute more than one program at a  time.&lt;br /&gt;process - executes single program&lt;br /&gt;&lt;br /&gt;Answer2:&lt;br /&gt;A thread is a path of execution that run on CPU, a  proccess is a collection of threads that share the same  virtual memory. A process have at least one thread of  execution, and a thread always run in a process context.&lt;br /&gt;&lt;br /&gt;Answer3:&lt;br /&gt;The operating system creates a process for the purpose  of running a program. Each process executes a single  program. Processes own resources allocated by the  operating system. Resources include memory, file  handles, sockets, device handles, and windows. Processes  do not share address spaces or file resources except  through explicit methods such as inheriting file handles  or shared memory segments, or mapping the same file in a  shared way.&lt;br /&gt;Threads allow a program to do multiple things  concurrently. At least one thread exists within each  process. If multiple threads can exist within a process,  then they share the same memory and file resources.&lt;br /&gt;&lt;br /&gt;Answer4:&lt;br /&gt;Thread is a light weight process, which is initialized  itself by a process. Light weigt processes does not  loads resources required by it itself, these are loaded  by its parent process which has generated it. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;What is a Windows Service and how does its lifecycle  differ from a “standard” EXE? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Windows Service applications are long-running  applications that are ideal for use in server  environments. The applications do not have a user  interface or produce any visual output; it is instead  used by other programs or the system to perform  operations. Any user messages are typically written to  the Windows Event Log. Services can be automatically  started when the computer is booted. This makes services  ideal for use on a server or whenever you need  long-running functionality that does not interfere with  other users who are working on the same computer. They  do not require a logged in user in order to execute and  can run under the context of any user including the  system. Windows Services are controlled through the  Service Control Manager where they can be stopped,  paused, and started as needed.&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;span class="heading_2"&gt;NET And Asp .Net Interview Questions And Answers&lt;/span&gt;&lt;span style="font-weight: 400;"&gt;&lt;span style="font-family:Arial;font-size:100%;"&gt;  &lt;span class="small_headings"&gt;[.Net and Asp .Net Frequently Asked Questions ,.Net  And Asp .Net FAQ ] &lt;a href="http://www.addthis.com/bookmark.php" onclick="addthis_url   = location.href; addthis_title = document.title; return addthis_click(this);" target="_blank"&gt;&lt;img src="http://s7.addthis.com/button2-bm.png" alt="AddThis Social Bookmark Button" border="0" height="24" width="160" /&gt;&lt;/a&gt; &lt;script type="text/javascript"&gt;var addthis_pub = 'leopez';&lt;/script&gt;&lt;script type="text/javascript" src="http://s7.addthis.com/js/widget.php?v=10"&gt;&lt;/script&gt;   &lt;/span&gt; &lt;/p&gt;&lt;p&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;&lt;u&gt; &lt;b&gt;&lt;span class="for_questions_blue"&gt;What is the difference between an EXE and a DLL?&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;span class="answers"&gt;An EXE can run independently, whereas DLL will run  within an EXE. DLL is an in-process file and EXE is an  out-process file &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;u&gt;What is strong-typing versus weak-typing? Which is  preferred? Why?&lt;/u&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Strong type is checking the types of variables as soon  as possible, usually at compile time. While weak typing  is delaying checking the types of the system as late as  possible, usually to run-time. Which is preferred  depends on what you want. For scripts &amp; quick stuff  you’ll usually want weak typing, because you want to  write as much less code as possible. In big programs,  strong typing can reduce errors at compile time. &lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;u&gt;What are PDBs? Where must they be located for debugging  to work? &lt;/u&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Answer1:&lt;br /&gt;To debug precompiled components such as business objects  and code-behind modules, you need to generate debug  symbols. To do this, compile the components with the  debug flags by using either Visual Studio .NET or a  command line compiler such as Csc.exe (for Microsoft  Visual C# .NET) or Vbc.exe (for Microsoft Visual Basic .NET).&lt;br /&gt;&lt;br /&gt;Using Visual Studio .NET&lt;br /&gt;1. Open the ASP.NET Web Application project in Visual  Studio .NET.&lt;br /&gt;2. Right-click the project in the Solution Explorer and  click Properties.&lt;br /&gt;3. In the Properties dialog box, click the Configuration  Properties folder.&lt;br /&gt;4. In the left pane, select Build.&lt;br /&gt;5. Set Generate Debugging Information to true.&lt;br /&gt;6. Close the Properties dialog box.&lt;br /&gt;7. Right-click the project and click Build to compile  the project and generate symbols (.pdb files).&lt;br /&gt;&lt;br /&gt;Answer2:&lt;br /&gt;A program database (PDB) file holds debugging and  project state information that allows incremental  linking of a Debug configuration of your program.&lt;br /&gt;The linker creates project.PDB, which contains debug  information for the project’s EXE file. The project.PDB  contains full debug information, including function  prototypes, not just the type information found in  VCx0.PDB. Both PDB files allow incremental updates.&lt;br /&gt;They should be located at bin\Debug directory &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;u&gt;What is cyclomatic complexity and why is it important? &lt;/u&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Cyclomatic complexity is a computer science metric  (measurement) developed by Thomas McCabe used to  generally measure the complexity of a program. It  directly measures the number of linearly independent  paths through a program’s source code.&lt;br /&gt;&lt;br /&gt;The concept, although not the method, is somewhat  similar to that of general text complexity measured by  the Flesch-Kincaid Readability Test.&lt;br /&gt;&lt;br /&gt;Cyclomatic complexity is computed using a graph that  describes the control flow of the program. The nodes of  the graph correspond to the commands of a program. A  directed edge connects two nodes, if the second command  might be executed immediately after the first command.  By definition,&lt;br /&gt;&lt;br /&gt;CC = E - N + P&lt;br /&gt;&lt;br /&gt;where&lt;br /&gt;CC = cyclomatic complexity&lt;br /&gt;E = the number of edges of the graph&lt;br /&gt;N = the number of nodes of the graph&lt;br /&gt;P = the number of connected components. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;u&gt;What is FullTrust? Do GAC’ed assemblies have FullTrust?&lt;/u&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Your code is allowed to do anything in the framework,  meaning that all (.Net) permissions are granted. The GAC  has FullTrust because it’s on the local HD, and that has  FullTrust by default, you can change that using caspol&lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;b class="for_questions_blue"&gt;&lt;u&gt;What does this do? gacutil /l | find /i “about”  &lt;/u&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Answer1:&lt;br /&gt;This command is used to install strong typed assembly in  GAC&lt;br /&gt;&lt;br /&gt;Answer2:&lt;br /&gt;gacutil.exe is used to install strong typed assembly in  GAC. gacutil.exe /l is used to lists the contents of the  global assembly cache. |(pipe) symbol is used to filter  the output with another command. find /i “about” is to  find the text “about” on gacutil output. If any lines  contains the text “about” then that line will get  displayed on console window. &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="for_questions_blue"&gt;&lt;b&gt;&lt;u&gt;Contrast OOP and SOA. What are tenets of each  &lt;/u&gt; &lt;/b&gt;&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;Service Oriented Architecture. In SOA you create an  abstract layer that your applications use to access  various “services” and can aggregate the services. These  services could be databases, web services, message  queues or other sources. The Service Layer provides a  way to access these services that the applications do  not need to know how the access is done. For example, to  get a full customer record, I might need to get data  from a SGL Server database, a web service and a message  queue. The Service layer hides this from the calling  application. All the application knows is that it asked  for a full customer record. It doesn’t know what system  or systems it came from or how it was retrieved. &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;b class="for_questions_blue"&gt;&lt;u&gt;How does the XmlSerializer work? What ACL permissions  does a process using it require? &lt;/u&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;XmlSerializer requires write permission to the system’s  TEMP directory. &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;b class="for_questions_blue"&gt;&lt;u&gt;Why is catch(Exception) almost always a bad idea?&lt;/u&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Well, if at that point you know that an error has  occurred, then why not write the proper code to handle  that error instead of passing a new Exception object to  the catch block? Throwing your own exceptions signifies  some design flaws in the project. &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;b class="for_questions_blue"&gt;&lt;u&gt;What is the difference between Debug. Write and  Trace. Write? When should each be used? &lt;/u&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Answer1:&lt;br /&gt;The Debug. Write call won’t be compiled when the DEBUG  symbol is not defined (when doing a release build).  Trace. Write calls will be compiled. Debug. Write is for  information you want only in debug builds, Trace. Write  is for when you want it in release build as well. And in  any case, you should use something like log4net because  that is both faster and better&lt;br /&gt;&lt;br /&gt;Answer2:&lt;br /&gt;Debug. Write &amp;amp; Trace. write - both works in Debug mode,  while in Release Mode,Trace.write only will work .Try  changing the Active Config property of Solution in  Property page nd find the difference. Debug.write is  used while debugging a project and Trace.write is used in  Released version of Applications. &lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt; &lt;b class="for_questions_blue"&gt;&lt;u&gt;What is the difference between a Debug and Release  build? Is there a significant speed difference? Why or  why not? &lt;/u&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Debug build contain debug symbols and can be debugged  while release build doesn’t contain debug symbols,  doesn’t have [Conational(”DEBUG”)] methods calls  compiled, can’t be debugged (easily, that is), less  checking, etc. There should be a speed difference,  because of disabling debug methods, reducing code size  etc but that is not a guarantee (at least not a  significant one)&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="for_questions_blue"&gt;&lt;b&gt;&lt;u&gt;Contrast the use of an abstract base class against an  interface? &lt;/u&gt; &lt;/b&gt;&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;Answer1:&lt;br /&gt;In the interface all methods must be abstract, in the  abstract class some methods can be concrete. In the  interface no accessibility modifiers are allowed, which  is ok in abstract classes&lt;br /&gt;&lt;br /&gt;Answer2:&lt;br /&gt;Whether to Choose VB.NET/C#.&lt;br /&gt;Both the languages are using same classes and namespaces.  Once it compile and generates MSIL, there is no meaning  of which language it was written. If you are Java/C++  programmer better to choose C# for same coding style  otherwise you can choose VB.net.&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;span class="heading_2"&gt;NET And Asp .Net Interview Questions And Answers&lt;/span&gt;&lt;span style="font-weight: 400;"&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;  &lt;span class="small_headings"&gt;[.Net and Asp .Net Frequently Asked Questions ,.Net  And Asp .Net FAQ ] &lt;a href="http://www.addthis.com/bookmark.php" onclick="addthis_url   = location.href; addthis_title = document.title; return addthis_click(this);" target="_blank"&gt;&lt;img src="http://s7.addthis.com/button2-bm.png" alt="AddThis Social Bookmark Button" border="0" height="24" width="160" /&gt;&lt;/a&gt; &lt;script type="text/javascript"&gt;var addthis_pub = 'leopez';&lt;/script&gt;&lt;script type="text/javascript" src="http://s7.addthis.com/js/widget.php?v=10"&gt;&lt;/script&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt; &lt;p&gt; &lt;u&gt;&lt;span style="color: rgb(0, 0, 255);"&gt; &lt;b&gt;&lt;span class="for_questions_blue"&gt;What is the difference between a.Equals(b) and a ==  b?&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/u&gt;&lt;span class="answers"&gt;Answer1:&lt;br /&gt;a=b is used for assigning the values (rather then  comparison) and a==b is for comparison.&lt;br /&gt;&lt;br /&gt;Answer2:&lt;br /&gt;a == b is used to compare the references of two objects&lt;br /&gt;a.Equals(b) is used to compare two objects&lt;br /&gt;&lt;br /&gt;Answer3:&lt;br /&gt;A equals b -&gt; copies contents of b to a&lt;br /&gt;a == b -&gt; checks if a is equal to b&lt;br /&gt;&lt;br /&gt;Answer4:&lt;br /&gt;Equals method compares both type and value of the  variable, while == compares value.&lt;br /&gt;int a = 0;&lt;br /&gt;bool b = 0&lt;br /&gt;&lt;br /&gt;if(a.Equals(b))&lt;br /&gt;&lt;br /&gt;Answer5:&lt;br /&gt;a.Equals(b) checks whether the Type of a is equal to b  or not! Put it in another way,&lt;br /&gt;Dim a As Integer = 1&lt;br /&gt;Dim b As Single = 1&lt;br /&gt;&lt;br /&gt;a.Equals(b) returns false. The Equals method returns a  boolean value.&lt;br /&gt;a == b is a simple assignment statement.&lt;br /&gt;&lt;br /&gt;Answer6:&lt;br /&gt;a.equals(b) will check whether the “b” has same type as  “a” has and also has the same data as “a” has.&lt;br /&gt;a==b will do the same thing.&lt;br /&gt;if you have done this in c++ under “operator  overloading” than you guys must be aware of this sytaxts.  they are doing the same thing there is only sytaxtical  difference.&lt;br /&gt;let me explain it in different manner.&lt;br /&gt;a==b : means compare “b” with “a”. always left hand side  expression evaluated first so here in this case “a”  (considered an object) will call the overloaded operator  “=” which defines “Equals(object)” method in it’s class.  thus, ultimately a.equals(b) goanna called.&lt;br /&gt;so the answer is: both will perform the same task. they  are different by syntaxt&lt;br /&gt;&lt;br /&gt;Answer7:&lt;br /&gt;Difference b/w a==b,a.Equals(b)&lt;br /&gt;a.Equals(b):&lt;br /&gt;The default implementation of Equals supports reference  equality only, but derived classes can override this  method to support value equality.&lt;br /&gt;&lt;br /&gt;For reference types, equality is defined as object  equality; that is, whether the references refer to the  same object. For value types, equality is defined as  bitwise equality&lt;br /&gt;== :&lt;br /&gt;For predefined value types, the equality operator (==)  returns true if the values of its operands are equal,  false otherwise. For reference types other than string,  == returns true if its two operands refer to the same  object. For the string type, == compares the values of  the strings.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt; &lt;u&gt;How would one do a deep copy in .NET?&lt;/u&gt;&lt;/span&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Answer1:&lt;br /&gt;System.Array.CopyTo() - Deep copies an Array&lt;br /&gt;&lt;br /&gt;Answer2:&lt;br /&gt;How would one do a deep copy in .NET?&lt;br /&gt;The First Approach.&lt;br /&gt;1.Create a new instance.&lt;br /&gt;2.Copy the properties from source instance to newly  created instance.&lt;br /&gt;[Use reflection if you want to write a common method to  achive this]&lt;br /&gt;&lt;br /&gt;The Second Approach.&lt;br /&gt;1. Serialize the object and deserialize the output.&lt;br /&gt;: Use binary serialization if you want private variables  to be copied.&lt;br /&gt;: Use xml Serialization if you dont want private  variable to be copied.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt; &lt;u&gt;What is boxing? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Boxing is an implicit conversion of a value type to the  type object&lt;br /&gt;int i = 123; // A value type&lt;br /&gt;Object box = i // Boxing&lt;br /&gt;Unboxing is an explicit conversion from the type object  to a value type&lt;br /&gt;int i = 123; // A value type object box = i; // Boxing&lt;br /&gt;int j = (int)box; // Unboxing &lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;Is string a value type or a reference type?  &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Answer1:&lt;br /&gt;String is Reference Type.&lt;br /&gt;Value type - bool, byte, chat, decimal, double, enum ,  float, int, long, sbyte, short,strut, uint, ulong,  ushort&lt;br /&gt;Value types are stored in the Stack&lt;br /&gt;Reference type - class, delegate, interface, object,  string&lt;br /&gt;Reference types are stored in the Heap&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Answer2:&lt;br /&gt;Yes String is reference type. C# gives two types of  variable reference and value type. string and object are  reference type. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;How does the lifecycle of Windows services differ from  Standard EXE? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Windows services lifecycle is managed by “Service  Control Manager” which is responsible for starting and  stopping the service and the applications do not have a  user interface or produce any visual output, but  “Standard executable” doesn’t require Control Manager  and is directly related to the visual output &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;What’s wrong with a line like this?  DateTime.Parse(myString) &lt;/u&gt;&lt;/span&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;the result returned by this function is not assigned to  anything, should be something like varx =  DateTime.Parse(myString) &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;NET is Compile Time OR RunTime Environment? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;.Net’s framework has CLS,CTS and CLR.CTS checks  declartion of types at the time when u write code and  CLS defines some rules and restrictions.and CLR comile  everything at runtime with following benefits: 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 Self describing  objects &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;Describe the role of inetinfo.exe, aspnet_isapi.dll  andaspnet_wp.exe in the page loading process.&lt;/u&gt;&lt;/span&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;inetinfo.exe is theMicrosoft IIS server running,  handling ASP.NET requests among other things.When an  ASP.NET request is received (usually a file with .aspx  extension),the ISAPI filter aspnet_isapi.dll takes care  of it by passing the request tothe actual worker process  aspnet_wp.exe.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt; &lt;u&gt;What’s the difference between Response.Write()  andResponse.Output.Write()? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;The latter one allows you to write formattedoutput. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;What methods are fired during the page load?  &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Init() - when the pageis&lt;br /&gt;instantiated, Load() - when the page is loaded into  server memory,PreRender()&lt;br /&gt;- the brief moment before the page is displayed to the  user asHTML, Unload()&lt;br /&gt;- when page finishes loading. &lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;Where does the Web page belong in the .NET Framework  class hierarchy? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;System.Web.UI.Page &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;Where do you store the information about the user’s  locale? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;System.Web.UI.Page.Culture &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;What’s the difference between Codebehind="MyCode.aspx.cs"  andSrc="MyCode.aspx.cs"? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;CodeBehind is relevant to Visual Studio.NET only. &lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;What’s a bubbled event? &lt;/u&gt; &lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;When you have a complex control,  like DataGrid, writing  an event processing routine for each object (cell,  button, row, etc.) is quite tedious. The controls can  bubble up their event handlers, allowing the main  DataGrid event handler to take care of its constituents. &lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;Suppose you want a certain ASP.NET function executed on  MouseOver overa certain button. Where do you add an  event handler? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;It’s the Attributesproperty,&lt;br /&gt;the Add function inside that property. So&lt;br /&gt;&lt;br /&gt;btnSubmit.Attributes.Add("onMouseOver","someClientCode();")&lt;br /&gt;&lt;br /&gt;A simple”Javascript:ClientCode();” in the button control  of the .aspx page will attach the handler (javascript  function)to the onmouseover event. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;u&gt;What data type does the RangeValidator control support? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Integer,String and Date.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="answers"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;span class="answers"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7468658770095272063-58032562376314946?l=dotnet786.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnet786.blogspot.com/feeds/58032562376314946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7468658770095272063&amp;postID=58032562376314946' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/58032562376314946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/58032562376314946'/><link rel='alternate' type='text/html' href='http://dotnet786.blogspot.com/2007/05/net-and-asp-net-interview-questions-and.html' title='.NET And Asp .Net Interview Questions And Answers'/><author><name>prashanth</name><uri>http://www.blogger.com/profile/07711599595106933499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7468658770095272063.post-919905712536183751</id><published>2007-05-30T10:11:00.000-07:00</published><updated>2007-05-30T10:12:36.008-07:00</updated><title type='text'>.NET and COM Inteview Questions and Answers</title><content type='html'>&lt;h2&gt;&lt;span class="heading_2"&gt;NET and Com Interop Interview Questions And Answers&lt;/span&gt;&lt;span style="font-weight: 400;"&gt;&lt;span style="font-family:Arial;font-size:100%;"&gt;  &lt;span class="small_headings"&gt;[.NET and Com Interop Frequently Asked Questions ,.Net  and Com Interop FAQ ]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt; &lt;p&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;&lt;b&gt;&lt;span class="for_questions_blue"&gt;Describe the advantages of writing a managed code  application instead of unmanaged one. What’s involved in  certain piece of code being managed?&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;span class="answers"&gt;The advantages include automatic garbage collection,  memory management, support for versioning and security.  These advantages are provided through .NET FCL and CLR,  while with the unmanaged code similar capabilities had  to be implemented through third-party libraries or as a  part of the application itself. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="for_questions_blue"  style="color:#0000ff;"&gt;&lt;u&gt; &lt;b&gt;Are COM objects managed or unmanaged? &lt;/b&gt;&lt;/u&gt;&lt;/span&gt; &lt;span class="answers"&gt;&lt;br /&gt;Since COM objects were written before .NET, apparently  they are unmanaged.&lt;br /&gt;Any code not written in the Microsoft .NET framework  environment is UNMANAGED. So naturally COM+ is unmanaged  because it is written in Visual Basic 6. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="for_questions_blue"  style="color:#0000ff;"&gt;&lt;u&gt; &lt;b&gt;So can a COM object talk to a .NET object? &lt;/b&gt;&lt;/u&gt; &lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;Yes, through Runtime Callable Wrapper (RCW) or PInvoke. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="for_questions_blue"  style="color:#0000ff;"&gt;&lt;u&gt; &lt;b&gt;How do you generate an RCW from a COM object? &lt;/b&gt;&lt;/u&gt; &lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;Use the Type Library Import utility shipped with SDK.  tlbimp COMobject.dll /out:.NETobject.dll or reference the COM library from  Visual Studio in your project. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="for_questions_blue"  style="color:#0000ff;"&gt;&lt;u&gt; &lt;b&gt;I can’t import the COM object that I have on my  machine. Did you write that object?&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt; &lt;!--webbot bot="Include" U-Include="_private/tbl_gglapck.htm" TAG="BODY" startspan --&gt;&lt;!--webbot bot="Include" i-checksum="45405" endspan --&gt;&lt;p&gt; &lt;span class="answers"&gt;You can only import your own objects. If you need to use  a COM component from another developer, you should  obtain a Primary Interop Assembly (PIA) from whoever  authored the original object.&lt;br /&gt;&lt;br /&gt;The answer to (5) is only partially correct. You *can*  import COM objects, even if they are not your own. It is  recommended that you obtain the Primary Interop from the  vendor, but not required. The most common problem  importing a COM DLL is that it exposes objects that form  part of a separate COM DLL. You can generate interops  for these additional DLLs, and then refer to them when  importing the problem DLL. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="for_questions_blue"  style="color:#0000ff;"&gt;&lt;u&gt; &lt;b&gt;How do you call unmanaged methods from your .NET code  through PInvoke? &lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;Supply a DllImport attribute. Declare the methods in  your .NET code as static extern. Do not implement the  methods as they are implemented in your unmanaged code,  you’re just providing declarations for method  signatures. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="for_questions_blue"  style="color:#0000ff;"&gt;&lt;u&gt; &lt;b&gt;Can you retrieve complex data types like structs from  the PInvoke calls? &lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;Yes, just make sure you re-declare that struct, so that  managed code knows what to do with it. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="for_questions_blue"  style="color:#0000ff;"&gt;&lt;u&gt; &lt;b&gt;I want to expose my .NET objects to COM objects. Is that  possible? &lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;Yes, but few things should be considered first. Classes  should implement interfaces explicitly. Managed types  must be public. Methods, properties, fields, and events  that are exposed to COM must be public. Types must have  a public default constructor with no arguments to be  activated from COM. Types cannot be abstract. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="for_questions_blue"  style="color:#0000ff;"&gt;&lt;u&gt; &lt;b&gt;Can you inherit a COM class in a .NET application? &lt;/b&gt; &lt;/u&gt;&lt;/span&gt; &lt;span class="answers"&gt;&lt;br /&gt;The .NET Framework extends the COM model for reusability  by adding implementation inheritance. Managed types can  derive directly or indirectly from a COM coclass; more  specifically, they can derive from the runtime callable  wrapper generated by the runtime. The derived type can  expose all the method and properties of the COM object  as well as methods and properties implemented in managed  code. The resulting object is partly implemented in  managed code and partly implemented in unmanaged code. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt; Suppose I call a COM object from a .NET application, but  COM object throws an error. What happens on the .NET  end? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;COM methods report errors by returning HRESULTs; .NET  methods report them by throwing exceptions. The runtime  handles the transition between the two. Each exception  class in the .NET Framework maps to an HRESULT.&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7468658770095272063-919905712536183751?l=dotnet786.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnet786.blogspot.com/feeds/919905712536183751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7468658770095272063&amp;postID=919905712536183751' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/919905712536183751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/919905712536183751'/><link rel='alternate' type='text/html' href='http://dotnet786.blogspot.com/2007/05/net-and-com-inteview-questions-and.html' title='.NET and COM Inteview Questions and Answers'/><author><name>prashanth</name><uri>http://www.blogger.com/profile/07711599595106933499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7468658770095272063.post-1485158040816885963</id><published>2007-05-30T10:10:00.000-07:00</published><updated>2007-05-30T10:11:19.855-07:00</updated><title type='text'>.NET Deployment Questions and answers</title><content type='html'>&lt;h3 class="post-title"&gt;                          &lt;a href="http://rainbowonnet.blogspot.com/2006/12/net-deployment-questions-and-answers.html"&gt;.NET Deployment Questions and Answers&lt;/a&gt;                      &lt;/h3&gt;                        &lt;strong&gt;What do you know about .NET assemblies?&lt;/strong&gt;&lt;br /&gt;Assemblies are the smallest units of versioning and deployment in the .NET application. Assemblies are also the building blocks for programs such as &lt;a id="KonaLink3" target="_top" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://rainbowonnet.blogspot.com/2006/12/net-deployment-questions-and-answers.html#"&gt;&lt;span style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;color:red;" &gt;&lt;span class="kLink" style="border-bottom: 1px solid red; color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static; padding-bottom: 1px; background-color: transparent;"&gt;Web &lt;/span&gt;&lt;span class="kLink" style="border-bottom: 1px solid red; color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static; padding-bottom: 1px; background-color: transparent;"&gt;services&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;, Windows services, serviced components, and .NET remoting applications.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What’s the difference between private and shared assembly?&lt;/strong&gt;&lt;br /&gt;Private assembly is used inside an application only and does not have to be identified by a strong name. Shared assembly can be used by multiple applications and has to have a strong name.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What’s a strong name?&lt;/strong&gt;&lt;br /&gt;A strong name includes the name of the assembly, version number, culture identity, and a public key token.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How can you tell the &lt;a id="KonaLink4" target="_top" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://rainbowonnet.blogspot.com/2006/12/net-deployment-questions-and-answers.html#"&gt;&lt;span style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-size: 13px; position: static;color:red;" &gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-size: 13px; position: static;"&gt;application&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; to look for assemblies at the locations other than its own install?&lt;/strong&gt;&lt;br /&gt;Use the&lt;br /&gt;directive in the &lt;a id="KonaLink5" target="_top" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://rainbowonnet.blogspot.com/2006/12/net-deployment-questions-and-answers.html#"&gt;&lt;span style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;color:red;" &gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;"&gt;XML&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; .config file for a given application.&lt;br /&gt;&lt;br /&gt;should do the trick. Or you can add additional search paths in the Properties box of the deployed application.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How can you debug failed assembly binds?&lt;/strong&gt;&lt;br /&gt;Use the Assembly Binding Log Viewer (fuslogvw.exe) to find out the paths searched.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Where are shared assemblies stored?&lt;/strong&gt;&lt;br /&gt;Global assembly cache.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How can you create a strong name for a .NET assembly?&lt;/strong&gt;&lt;br /&gt;With the help of Strong Name tool (sn.exe).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Where’s global assembly cache located on the system?&lt;/strong&gt;&lt;br /&gt;Usually C:\winnt\assembly or C:\windows\assembly.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Can you have two files with the same file name in GAC?&lt;/strong&gt;&lt;br /&gt;Yes, remember that GAC is a very special folder, and while normally you would not be able to place two files with the same name into a Windows folder, GAC differentiates by version number as well, so it’s possible for MyApp.dll and MyApp.dll to co-exist in GAC if the first one is version 1.0.0.0 and the second one is 1.1.0.0.&lt;br /&gt;&lt;br /&gt;So let’s say I have an application that uses MyApp.dll assembly, version 1.0.0.0. There is a security bug in that assembly, and I publish the patch, issuing it under name MyApp.dll 1.1.0.0. How do I tell the client applications that are already installed to start using this new MyApp.dll?&lt;br /&gt;&lt;br /&gt;Use publisher policy. To configure a publisher policy, use the publisher policy configuration file, which uses a format similar app .config file. But unlike the app .config file, a publisher policy file needs to be compiled into an assembly and placed in the GAC.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is delay signing?&lt;/strong&gt;&lt;br /&gt;Delay signing allows you to place a shared assembly in the GAC by signing the assembly with just the public key. This allows the assembly to be signed with the private key at a later stage, when the development process is complete and the component or assembly is ready to be deployed. This process enables developers to work with shared assemblies as if they were strongly named, and it secures the private key of the signature from being accessed at different stages of development.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7468658770095272063-1485158040816885963?l=dotnet786.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnet786.blogspot.com/feeds/1485158040816885963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7468658770095272063&amp;postID=1485158040816885963' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/1485158040816885963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/1485158040816885963'/><link rel='alternate' type='text/html' href='http://dotnet786.blogspot.com/2007/05/net-deployment-questions-and-answers.html' title='.NET Deployment Questions and answers'/><author><name>prashanth</name><uri>http://www.blogger.com/profile/07711599595106933499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7468658770095272063.post-1645005709747866201</id><published>2007-05-30T10:08:00.000-07:00</published><updated>2007-05-30T10:09:26.248-07:00</updated><title type='text'>.NET Database interview Q &amp; A Part-2</title><content type='html'>&lt;strong&gt;What is the purpose of using COLLATE in a query?&lt;/strong&gt;&lt;br /&gt;Answer1.&lt;br /&gt;Collation refers to a set of rules that determine how data is sorted and compared. Character data is sorted using rules that define the correct character sequence, with options for specifying case-sensitivity, accent marks, kana character types and character width.&lt;br /&gt;&lt;br /&gt;Answer2.&lt;br /&gt;COLLATE is a clause that can be applied to a &lt;a id="KonaLink1" target="_top" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://rainbowonnet.blogspot.com/2006/12/net-database-interview-q-part-2.html#"&gt;&lt;span style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;color:red;" &gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;"&gt;database&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; definition or a column definition to define the collation, or to a character string expression to apply a collation cast.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is one of the first things you would do to increase performance of a query? For example, a boss tells you that “a query that ran yesterday took 30 seconds, but today it takes 6 minutes”?&lt;/strong&gt;&lt;br /&gt;Answer1.&lt;br /&gt;Use Storedprocedure for any optimized result, because it is an compiled code.&lt;br /&gt;&lt;br /&gt;Answer2.&lt;br /&gt;One of the best ways to increase query performance is to use indexes.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is an execution plan? When would you use it? How would you view the execution plan?&lt;/strong&gt;&lt;br /&gt;The Query Analyzer has a feature called Show Execution Plan. This option allows you to view the execution plan used by &lt;a id="KonaLink2" target="_top" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://rainbowonnet.blogspot.com/2006/12/net-database-interview-q-part-2.html#"&gt;&lt;span style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;color:red;" &gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;"&gt;SQL&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; Server’s Query Optimizer to actually execute the query. This option is available from the Query menu on the main menu of Query Analyzer, and must be turned on before the query is executed. Once the query is executed, the results of the execution plan are displayed in graphical format in a separate window, available from a tab that appears below the query results window on the screen.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is the STUFF function and how does it differ from the REPLACE function?&lt;/strong&gt;&lt;br /&gt;Answer1:&lt;br /&gt;stuff-&gt; inserts into it without removing any thing. Replace-&gt;replace the given text with the new one.&lt;br /&gt;&lt;br /&gt;Answer2:&lt;br /&gt;STUFF - it deletes a specified length of characters and inserts another set of characters at a specified starting point. REPLACE -Replaces all occurrences of a specified string value with another string value.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What does it mean to have quoted_identifier on? What are the implications of having it off?&lt;/strong&gt;&lt;br /&gt;SET QUOTED_IDENTIFIER ON- Causes &lt;a id="KonaLink3" target="_top" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://rainbowonnet.blogspot.com/2006/12/net-database-interview-q-part-2.html#"&gt;&lt;span style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;color:red;" &gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;"&gt;SQL &lt;/span&gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;"&gt;Server&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; to follow the SQL-92 rules regarding quotation mark delimiting identifiers and literal strings. Identifiers delimited by double quotation marks can be either Transact-SQL reserved keywords or can contain characters not usually allowed by the Transact-SQL syntax rules for identifiers.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is the difference between a Local temporary table and a Global temporary table? How is each one used?&lt;/strong&gt;&lt;br /&gt;Answer1:&lt;br /&gt;Local templrary table will have a single # (#tablename) appended with the table name.Global templrary table will have Double # (##tablename) appended with the table name.&lt;br /&gt;Ex:create table #table1&lt;br /&gt;local temp. table will be available until the session who created it logs out, but global temp. table is available till the last session gets close in &lt;a id="KonaLink4" target="_top" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://rainbowonnet.blogspot.com/2006/12/net-database-interview-q-part-2.html#"&gt;&lt;span style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;color:red;" &gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;"&gt;SQLServer&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Answer2:&lt;br /&gt;Local temporary tables are visible only in the current session; global temporary tables are visible to all sessions.Prefix local temporary table names with single number sign (#table_name), and prefix global temporary table names with a double number sign (##table_name).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What are cursors? Name four type of cursors and when each one would be applied?&lt;/strong&gt;&lt;br /&gt;Opening a cursor on a result set allows processing the result set one row at a time.&lt;br /&gt;The four &lt;a id="KonaLink5" target="_top" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://rainbowonnet.blogspot.com/2006/12/net-database-interview-q-part-2.html#"&gt;&lt;span style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;color:red;" &gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;"&gt;API&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; server cursor types supported by SQL Server are:&lt;br /&gt;a) Static cursors&lt;br /&gt;b) Dynamic cursors&lt;br /&gt;c) Forward-only cursors&lt;br /&gt;d) Keyset-driven cursors&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is the purpose of UPDATE STATISTICS?&lt;/strong&gt;&lt;br /&gt;UPDATE STATISTICS- it updates information about the distribution of key values for one or more statistics groups (collections) in the specified table or indexed view.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How do you use DBCC statements to &lt;a id="KonaLink6" target="_top" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://rainbowonnet.blogspot.com/2006/12/net-database-interview-q-part-2.html#"&gt;&lt;span style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-size: 13px; position: static;color:red;" &gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-size: 13px; position: static;"&gt;monitor&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; various ASPects of a SQL Server installation?&lt;/strong&gt;&lt;br /&gt;Database Consistency Checker (DBCC) - Is a statement used to check the logical and physical consistency of a database, check memory usage, decrease the size of a database, check performance statistics, and so on. Database consistency checker (DBCC) ensures the physical and logical consistency of a database, but is not corrective. DBCC can help in repairing or checking the installation in case of any failure.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is referential integrity and how can we achieve it?&lt;/strong&gt;&lt;br /&gt;Referential integrity preserves the defined relationships between tables when records are entered or deleted. In SQL Server, referential integrity is based on relationships between foreign keys and primary keys or between foreign keys and unique keys. Referential integrity ensures that key values are consistent across tables. Such consistency requires that there be no references to nonexistent values and that if a key value changes, all references to it change consistently throughout the database.&lt;br /&gt;We can achieve this by using foreign key.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is indexing?&lt;/strong&gt;&lt;br /&gt;If we give proper indexes on a table so that any queries written against this table can run efficiently. As your data sets grow over time, SQL Server will continue to rebuild indexes and move data around as efficiently as possible. This property is known as Indexing.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Explain differences between server.transfer and server.execute method?&lt;/strong&gt;&lt;br /&gt;Answer1:&lt;br /&gt;server.transfer-&gt; transefers the server’s control to the requested page given in the parameter.&lt;br /&gt;server.Execute-&gt; executes the requested page from the current page itself,with no change in the &lt;a id="KonaLink7" target="_top" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://rainbowonnet.blogspot.com/2006/12/net-database-interview-q-part-2.html#"&gt;&lt;span style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;color:red;" &gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;"&gt;address &lt;/span&gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;"&gt;bar&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;. after execution the next line of code is executed in the current page.&lt;br /&gt;&lt;br /&gt;Answer2.&lt;br /&gt;Execute method returns control to the page in which it is called once the page specified in the Execute method finishes processing, the Transfer method does not return control to the calling page.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is de-normalization? When do you do it and how?&lt;/strong&gt;&lt;br /&gt;De-normalization is the process of attempting to optimize the performance of a database by adding redundant data. It’s used To introduce redundancy into a table in order to incorporate data from a related table. The related table can then be eliminated. De-normalization can improve efficiency and performance by reducing complexity in a data warehouse schema.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Explain features of SQL Server like Scalibility, Availability, Integration with Internet.&lt;/strong&gt;&lt;br /&gt;Scalibility - The same &lt;a id="KonaLink8" target="_top" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://rainbowonnet.blogspot.com/2006/12/net-database-interview-q-part-2.html#"&gt;&lt;span style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;color:red;" &gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;"&gt;Microsoft &lt;/span&gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;"&gt;SQL &lt;/span&gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;"&gt;Server&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; 2000 database engine operates on Microsoft Windows 2000 Professional, &lt;a id="KonaLink9" target="_top" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://rainbowonnet.blogspot.com/2006/12/net-database-interview-q-part-2.html#"&gt;&lt;span style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;color:red;" &gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;"&gt;Microsoft &lt;/span&gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;"&gt;Windows &lt;/span&gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;"&gt;2000 &lt;/span&gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;"&gt;Server&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;, Microsoft Windows 2000 Advanced Server, Windows 98, and Windows Millennium Edition. It also runs on all editions of Microsoft Windows NT version 4.0. The database engine is a robust server that can manage terabyte-sized databases accessed by thousands of users. Availability - SQL Server 2000 can maintain the extremely high levels of availability required by large Web sites and enterprise systems. Integration -The SQL Server 2000 TCP/IP Sockets communications support can be integrated with Microsoft Proxy Server to implement secure Internet and intranet communications.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is DataWarehousing?&lt;/strong&gt;&lt;br /&gt;A data warehouse is a collection of data gathered and organized so that it can easily by analyzed, extracted, synthesized, and otherwise be used for the purposes of further understanding the data.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is OLAP?&lt;/strong&gt;&lt;br /&gt;OLAP is an acronym for On Line Analytical Processing. It is an approach to quickly provide the answer to analytical queries that are dimensional in nature.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How do we upgrade SQL Server 7.0 to 2000?&lt;/strong&gt;&lt;br /&gt;Run the installation of the SQL Server 2000&lt;br /&gt;In the Existing Installation dialog box, click Upgrade your existing installation, and then click Next.&lt;br /&gt;In the Upgrade dialog box, you are prompted as to whether you want to proceed with the requested upgrade. Click Yes, upgrade my to start the upgrade process, and then click Next. The upgrade runs until finished.&lt;br /&gt;In the Connect to Server dialog box, select an authentication mode, and then click Next.&lt;br /&gt;If you are not sure which mode to use, accept the default: The Windows account information I use to log on to my computer with (Windows). In Start Copying Files dialog box, click Next.&lt;br /&gt;Now your Sql Server would be upgraded.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is job?&lt;/strong&gt;&lt;br /&gt;It can be defined as a task performed by a computer system. For example, printing a file is a job. Jobs can be performed by a single program or by a collection of programs.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is Task?&lt;/strong&gt;&lt;br /&gt;Whenever you execute a program, the operating system creates a new task for it. The task is like an envelope for the program: it identifies the program with a task number and attaches other bookkeeping information to it.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How do you find the error, how can you know the number of rows affected by last SQL Statement?&lt;/strong&gt;&lt;br /&gt;Answer1&lt;br /&gt;@@errors-&gt;give the last error occured in the current DB.&lt;br /&gt;Ans. select @@rowcount&lt;br /&gt;&lt;br /&gt;Answer2.&lt;br /&gt;Use @@ERROR which returns the error number for the last Transact-SQL statement executed fro knowing the error.&lt;br /&gt;Use @@ROWCOUNT which returns the number of rows affected by the last statement for finding the no of rows affected.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What are the advantages/disadvantages of viewstate?&lt;/strong&gt;&lt;br /&gt;Disadvantages - Because the view state for a given page must be kept on the server, it is possible for the current state to be out of synchronization with the current page of the browser, if the user uses the Back feature on the browser to go back in the history. Advantages - On ordinary Web Forms pages, their view state is sent by the server as a hidden variable in a form, as part of every response to the client, and is returned to the server by the client as part of a postback. However, to reduce bandwidth demand when using mobile controls, ASP.NET does not send a page’s view state to the client. Instead, the view state is saved as part of a user’s session on the server. Where there is a view state, a hidden field that identifies this page’s view state is sent by the server as part of every response to the client, and is returned to the server by the client as part of the next request.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Describe session handling in webform. How does it work and what are the limits?&lt;/strong&gt;&lt;br /&gt;Session management in ASP.NET can be done in two ways:&lt;br /&gt;Using Cookies&lt;br /&gt;Encoding of URLs with Session ID&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Explain differences between framework 1.0 and framework 1.1&lt;/strong&gt;&lt;br /&gt;1. Native Support for Developing Mobile Web Applications&lt;br /&gt;2. Unified Programming Model for Smart Client Application Development&lt;br /&gt;3. Enable Code Access Security for ASP.NET Applications&lt;br /&gt;4. Native Support for Communicating with ODBC and Oracle Databases&lt;br /&gt;5. Supports for IPv6&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;If we write any code for dataGrid methods, what is the access specifier used for that methods in the code behind file and why and how? Give an example.&lt;/strong&gt;&lt;br /&gt;We use Friends Modifer for the dataGrid methods. Friend WithEvents DataGrid1 As System.Windows.Forms.DataGrid&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is the use of trace utility?&lt;/strong&gt;&lt;br /&gt;Tracing is a very important monitoring and debugging tool for distributed, multitier applications. Such applications often contain problems that can only be observed when the application is under a heavy load and the inherent randomness of a real-life environment. Trace utility allows developers and administrators to monitor the health of applications running in real-life settings.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What are the differences between User control and Web control and Custom control?&lt;/strong&gt;&lt;br /&gt;Answer1:&lt;br /&gt;Usercontrol-&gt; control that is created as u wish.&lt;br /&gt;Web Control-&gt; any control placed in web page (web application page)&lt;br /&gt;Custom Control-&gt; same as user control with some difference.&lt;br /&gt;user control custome control&lt;br /&gt;1.easy to create difficult&lt;br /&gt;2.no full suport for customers using&lt;br /&gt;Visual studio tools Full support&lt;br /&gt;3. Seperate copy of the control in each&lt;br /&gt;assembly only one copy in global assembly.&lt;br /&gt;4. best for static layout best for dynamic layout.&lt;br /&gt;&lt;br /&gt;Answer2&lt;br /&gt;User control&lt;br /&gt;1) Reusability web page&lt;br /&gt;2) We can’t add to toolbox&lt;br /&gt;3) Just drag and drop from solution explorer to page (aspx)&lt;br /&gt;4) Good for static layout&lt;br /&gt;5) Easier to create&lt;br /&gt;6) Not complied into DLL&lt;br /&gt;&lt;br /&gt;Custom controls&lt;br /&gt;1) Reusability of control (or extend functionalities of existing control)&lt;br /&gt;2) We can add toolbox&lt;br /&gt;3) Just drag and drop from toolbox&lt;br /&gt;4) You can register user control to. Aspx page by Register tag&lt;br /&gt;5) A single copy of the control is required in each application&lt;br /&gt;6) Good for dynamic layout&lt;br /&gt;7) Hard to create&lt;br /&gt;8) Compiled in to dll&lt;br /&gt;&lt;br /&gt;Custom controls&lt;br /&gt;1) Reusability of control&lt;br /&gt;2) Pre defined Control&lt;br /&gt;3) Just drag and drop from toolbox&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;If I have more than one version of one assemblies, then how will I use old version in my application? Give an example.&lt;/strong&gt;&lt;br /&gt;Change the assembly version number in the AssemblyInfo.vb file&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How does you handle this COM components developed in other programming languages in.NET?&lt;/strong&gt;&lt;br /&gt;Answer1:&lt;br /&gt;add the component in add reference window, click .NETCOM tab.&lt;br /&gt;&lt;br /&gt;Answer2:&lt;br /&gt;While adding the refferences we can handle the COM components in other .Net programming languages.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How will you register COM+ services?&lt;/strong&gt;&lt;br /&gt;Through X-Copy Deployment.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How do u call and execute a stored procedure in .NET?&lt;/strong&gt;&lt;br /&gt;system.Data;&lt;br /&gt;system.Data.SqlClient;&lt;br /&gt;SqlConnection sqCon = new SqlConnection(”connection string”);&lt;br /&gt;SqlCommand sqCmd = new SqCmd();&lt;br /&gt;sqCmd.Connection = sqCon;&lt;br /&gt;sqCmd.CommandText = procedure_name;&lt;br /&gt;sqCmd.CommandType = CommandType.StoredProcedure;&lt;br /&gt;sqComd.ExecuteReader();&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What are the different types of replication? How are they used?&lt;/strong&gt;&lt;br /&gt;Replication is used for distributing data and the execution of stored procedures across an enterprise. The replication technology allows you to make duplicate copies of your data, move those copies to different locations, and synchronize the data automatically so that all copies have the same data values.&lt;br /&gt;The different types of replications are&lt;br /&gt;a) transactional replication&lt;br /&gt;b) merge replication&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How do SQL Server 2000 and XML linked? What is SQL Server agent?&lt;/strong&gt;&lt;br /&gt;Every Request or the Response to or from SQL Server is converted into XML format. Its purpose is to ease the implementation of tasks for the DBA, with its full-function scheduling engine, which allows you to schedule your own jobs and scripts.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How do you create thread in.NET?&lt;/strong&gt;&lt;br /&gt;1) Import System.Threading&lt;br /&gt;2) Create a new thread using new Thread() and assign the address of the method&lt;br /&gt;3) Use Thread Start method to start the execution.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7468658770095272063-1645005709747866201?l=dotnet786.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnet786.blogspot.com/feeds/1645005709747866201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7468658770095272063&amp;postID=1645005709747866201' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/1645005709747866201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/1645005709747866201'/><link rel='alternate' type='text/html' href='http://dotnet786.blogspot.com/2007/05/net-database-interview-q-part-2.html' title='.NET Database interview Q &amp; A Part-2'/><author><name>prashanth</name><uri>http://www.blogger.com/profile/07711599595106933499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7468658770095272063.post-7033621338996205037</id><published>2007-05-30T10:07:00.000-07:00</published><updated>2007-05-30T10:08:15.315-07:00</updated><title type='text'>.NET Database interview Q &amp; A Part-1</title><content type='html'>&lt;h3 class="post-title"&gt;                          &lt;a href="http://rainbowonnet.blogspot.com/2006/12/net-database-interview-q-part-1.html"&gt;.NET Database interview Q &amp; A Part-1&lt;/a&gt;                      &lt;/h3&gt;                        &lt;strong&gt;To test a &lt;a id="KonaLink1" target="_top" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://rainbowonnet.blogspot.com/2006/12/net-database-interview-q-part-1.html#"&gt;&lt;span style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-size: 13px; position: static;color:red;" &gt;&lt;span class="kLink" style="border-bottom: 1px solid red; color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-size: 13px; position: static; padding-bottom: 1px; background-color: transparent;"&gt;Web &lt;/span&gt;&lt;span class="kLink" style="border-bottom: 1px solid red; color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-size: 13px; position: static; padding-bottom: 1px; background-color: transparent;"&gt;Service&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; you must create a windows application or web application to consume this service? It is True/False?&lt;/strong&gt;&lt;br /&gt;FALSE&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How many classes can a single.NET DLL contain?&lt;/strong&gt;&lt;br /&gt;Answer1:&lt;br /&gt;As many&lt;br /&gt;&lt;br /&gt;Answer2:&lt;br /&gt;One or more&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What are good &lt;a id="KonaLink2" target="_top" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://rainbowonnet.blogspot.com/2006/12/net-database-interview-q-part-1.html#"&gt;&lt;span style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-size: 13px; position: static;color:red;" &gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-size: 13px; position: static;"&gt;ADO.NET&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; object(s) to replace the ADO Recordset object?&lt;/strong&gt;&lt;br /&gt;The differences includes&lt;br /&gt;In &lt;a id="KonaLink3" target="_top" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://rainbowonnet.blogspot.com/2006/12/net-database-interview-q-part-1.html#"&gt;&lt;span style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;color:red;" &gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;"&gt;ADO&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;, the in-memory representation of data is the recordset.&lt;br /&gt;In ADO.net, it is the dataset&lt;br /&gt;A recordset looks like a single table in ADO&lt;br /&gt;In contrast, a dataset is a collection of one or more tables in ADO.net&lt;br /&gt;ADO is designed primarily for connected access&lt;br /&gt;ADO.net the disconnected access to the database is used&lt;br /&gt;In ADO you communicate with the database by making calls to an OLE DB provider.&lt;br /&gt;In ADO.NET you communicate with the database through a data adapter (an OleDbDataAdapter, SqlDataAdapter, OdbcDataAdapter, or OracleDataAdapter object), which makes calls to an OLE DB provider or the APIs provided by the underlying data source.&lt;br /&gt;In ADO you cant update the &lt;a id="KonaLink4" target="_top" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://rainbowonnet.blogspot.com/2006/12/net-database-interview-q-part-1.html#"&gt;&lt;span style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;color:red;" &gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;"&gt;database&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; from the recordset. ADO.NET the data adapter allows you to control how the changes to the dataset are transmitted to the database.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;On order to get assembly info which namespace we should import?&lt;/strong&gt;&lt;br /&gt;System.Reflection Namespace&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How do you declare a static variable and what is its lifetime? Give an example.&lt;/strong&gt;&lt;br /&gt;Answer1&lt;br /&gt;static int Myint–The life time is during the entire application.&lt;br /&gt;br&gt; Answer2&lt;br /&gt;The static modifier is used to declare a static member, which belongs to the type itself rather than to a specific object. The static modifier can be used with fields, methods, properties, operators, events and constructors, but cannot be used with indexers, destructors, or types. In C#, the static keyword indicates a class variable. In VB, the equivalent keyword is Shared. Its scoped to the class in which it occurs.&lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;a. Static int var //in c#.net&lt;br /&gt;b. static void Time( ) //in c#.net&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How do you get records number from 5 to 15 in a dataset of 100 records? Write code.&lt;/strong&gt;&lt;br /&gt;Answer1&lt;br /&gt;DataSet ds1=new DataSet(); String strCon=”data source=IBM-6BC8A0DACEF;initial catalog=pubs;integrated security=SSPI;persist” +” &lt;a id="KonaLink5" target="_top" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://rainbowonnet.blogspot.com/2006/12/net-database-interview-q-part-1.html#"&gt;&lt;span style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;color:red;" &gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-weight: 400; font-size: 13px; position: static;"&gt;security&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; info=False;user&lt;br /&gt;id=sa;workstation id=IBM-6BC8A0DACEF;packet size=4096?;&lt;br /&gt;String strCom1=”SELECT * FROM employee”;&lt;br /&gt;SqlDataAdapter sqlDa1=new SqlDataAdapter(strCom1,strCon);&lt;br /&gt;ds1.Tables.Add(”employee”);&lt;br /&gt;sqlDa1.Fill(ds1,40,50,ds1.Tables[”employee”].TableName);&lt;br /&gt;DataGrid dg1.DataSource=ds1.Tables[”employee”].DefaultView;&lt;br /&gt;dg1.DataBind();&lt;br /&gt;&lt;br /&gt;Answer2&lt;br /&gt;OleDbConnection1.Open()&lt;br /&gt;OleDbDataAdapter1.Fill(DataSet21, 5, 15, “tab”)&lt;br /&gt;This will fill the dataset with the records starting at 5 to 15&lt;br /&gt; .NET Database interview questions&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How do you call and execute a Stored Procedure in.NET? Give an example.&lt;/strong&gt;&lt;br /&gt;Answer1&lt;br /&gt;ds1=new DataSet();&lt;br /&gt;sqlCon1=new SqlConnection(connectionstring);&lt;br /&gt;String strCom1=”byroyalty”;&lt;br /&gt;sqlCom1=new SqlCommand(strCom1,sqlCon1);&lt;br /&gt;sqlCom1.CommandType=CommandType.StoredProcedure;&lt;br /&gt;sqlDa1=new SqlDataAdapter(sqlCom1);&lt;br /&gt;SqlParameter myPar=new SqlParameter(”@percentage”,SqlDbType.Int);&lt;br /&gt;sqlCom1.Parameters.Add (myPar);&lt;br /&gt;myPar.Value=40;&lt;br /&gt;sqlDa1.Fill(ds1);&lt;br /&gt;dg1.DataSource=ds1;&lt;br /&gt;dg1.DataBind();&lt;br /&gt;&lt;br /&gt;Answer2&lt;br /&gt;Yes&lt;br /&gt;Dim cn as new OleDbConnection ( “Provider=Microsoft.Jet.OLEDB.4.0;”+ _&lt;br /&gt;“Data Source=C:\Documents and Settings\User\My Documents\Visual Studio Projects\1209\db1.mdb”+ _&lt;br /&gt;“User ID=Admin;”+ _&lt;br /&gt;“Password=;”);&lt;br /&gt;Dim cmd As New OleDbCommand(”Products”, cn)&lt;br /&gt;cmd.CommandType = CommandType.StoredProcedure&lt;br /&gt;Dim da As New OleDataAdapter(cmd)&lt;br /&gt;Dim ds As New DataSet()&lt;br /&gt;da.Fill(ds, “Products”)&lt;br /&gt;DataGrid1.DataSource = ds.Tables(”Products”)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is the maximum length of a varchar in &lt;a id="KonaLink6" target="_top" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://rainbowonnet.blogspot.com/2006/12/net-database-interview-q-part-1.html#"&gt;&lt;span style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-size: 13px; position: static;color:red;" &gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-size: 13px; position: static;"&gt;SQL &lt;/span&gt;&lt;span class="kLink" style="color: red ! important; font-family: Trebuchet,Trebuchet MS,Arial,sans-serif; font-size: 13px; position: static;"&gt;Server&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;?&lt;/strong&gt;&lt;br /&gt;Answer1&lt;br /&gt;VARCHAR[(n)]&lt;br /&gt;Null-terminated Unicode character string of length n,&lt;br /&gt;with a maximum of 255 characters. If n is not supplied, then 1 is assumed.&lt;br /&gt;&lt;br /&gt;Answer2&lt;br /&gt;8000&lt;br /&gt;&lt;br /&gt;Answer3&lt;br /&gt;The business logic is the aspx.cs or the aspx.vb where the code is being written. The presentation logic is done with .aspx extention.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How do you define an integer in SQL Server?&lt;/strong&gt;&lt;br /&gt;We define integer in Sql server as&lt;br /&gt;var_name int&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How do you separate business logic while creating an ASP.NET application?&lt;/strong&gt;&lt;br /&gt;There are two level of asp.net debugging&lt;br /&gt;1. Page level debugging&lt;br /&gt;For this we have to edit the page level debugging enable the trace to true in the line in the html format of the page.&lt;br /&gt;%@ Page Language=”vb” trace=”true”AutoEventWireup=”false” Codebehind=”WebForm1.aspx.vb” Inherits=”WebApplication2.WebForm1?&gt;&lt;br /&gt;&lt;br /&gt;2. You can enable the debugging in the application level for this&lt;br /&gt;Edit the following trace value in web.config file&lt;br /&gt;Enable trace enabled=true.&lt;br /&gt;&lt;br /&gt;If there is a calendar control to be included in each page of your application, and and we do not intend to use the Microsoft-provided calendar control, how do you develop it? Do you copy and paste the code into each and every page of your application?&lt;br /&gt;&lt;br /&gt;Create the Calendar User Control&lt;br /&gt;The control we will create will contain a calendar control and a label which has the corresponding date and time written&lt;br /&gt;Steps are:-&lt;br /&gt;&lt;br /&gt;Creating a CalenderControl&lt;br /&gt;1) To begin, open Visual Studio .NET and begin a new C# Windows Control Library.&lt;br /&gt;2) You may name it whatever you like, for this sample the project name will be CalenderControl&lt;br /&gt;&lt;br /&gt;Using the Calender Control in a Windows Application&lt;br /&gt;It’s just like adding any other control like a button or a label.&lt;br /&gt;1) First, create a new Windows Application project named: CustomControl.&lt;br /&gt;2) Add a reference to the Calender Control DLL named: CalenderControl.dll.&lt;br /&gt;3) Now you a can customize the Toolbox:&lt;br /&gt;Right-Click the Toolbox&gt; .NET Framework Components&gt; Browse&gt; select the CalenderControl.dll.&lt;br /&gt;4)The Calender Control is now added to the Toolbox and can be inserted in Windows Form as any other control. The control itself will take care of the date display&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How can you deploy an asp.net application ?&lt;/strong&gt;&lt;br /&gt;You can deploy an ASP.NET Web application using any one of the following three deployment options.&lt;br /&gt;a) Deployment using VS.NET installer&lt;br /&gt;b) Using the Copy Project option in VS .NET&lt;br /&gt;c) XCOPY Deployment&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Explain similarities and differences between Java and.NET?&lt;/strong&gt;&lt;br /&gt;Comparing Java and .NET is comparing apples and oranges. Either the question needs to be to compare Java and C# or J2EE and .NET.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What are the XML files that are important in developing an ASP.NET application?&lt;/strong&gt;&lt;br /&gt;The XML file necessary for the for developing an asp.net application is Web.config&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Specify the best ways to store variables so that we can access them in various pages of ASP.NET application?&lt;/strong&gt;&lt;br /&gt;Declare the variables in Global.aspx&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How many objects are there in ASP?&lt;/strong&gt;&lt;br /&gt;Answer1&lt;br /&gt;8 objects, they are request,response, server,application,session,file, dictionary, textstream.&lt;br /&gt;&lt;br /&gt;Answer2&lt;br /&gt;There are 6 objects in ASP.net&lt;br /&gt;a) Server&lt;br /&gt;b) Session&lt;br /&gt;c) Application&lt;br /&gt;d) ObjectContext&lt;br /&gt;e) Response&lt;br /&gt;f) Request&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Which DLL file is needed to be registered for ASP?&lt;/strong&gt;&lt;br /&gt;The dll needed for the ASP.net is SYSTEM.WEB.dll&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Is there any inbuilt paging (for example shoping cart, which will show next 10 records without refreshing) in ASP? How will you do pating?&lt;/strong&gt;&lt;br /&gt;Use DataGrid control which has in-built paging features for the purpose.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What does Server.MapPath do?&lt;/strong&gt;&lt;br /&gt;Answer1&lt;br /&gt;srver.mappath() maps the path given in the argument to the server’s physical path.&lt;br /&gt;&lt;br /&gt;Answer2&lt;br /&gt;It returns the complete(absolute) path of the file used in parameter.&lt;br /&gt;&lt;br /&gt;Answer3&lt;br /&gt;It returns a string containing the physical path in the server’s file system that corresponds to the virtual or relative path specified by the Path argument.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Name atleast three methods of response object other than Redirect.&lt;/strong&gt;&lt;br /&gt;Answer1&lt;br /&gt;a) Response.Clear( )&lt;br /&gt;Clears the content of the current output stream.&lt;br /&gt;b) Response.Close( )&lt;br /&gt;Closes the network socket for the current response.&lt;br /&gt;c) Response.End( )&lt;br /&gt;Stops processing the current request and sends all buffered content to the client immediately.&lt;br /&gt;&lt;br /&gt;Answer2&lt;br /&gt;methods of Response is Redirect a. Transfer&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Name atleast two methods of response object other than Transfer.&lt;/strong&gt;&lt;br /&gt;a) Response.ClearContent( )&lt;br /&gt;Clears the content of the current output stream.&lt;br /&gt;b) Response.ClearHeaders( )&lt;br /&gt;Clears the HTTP headers from the current output stream.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is State?&lt;/strong&gt;&lt;br /&gt;It is the property of the web forms.&lt;br /&gt;ASP.NET provides four types of state:&lt;br /&gt;Application state&lt;br /&gt;Session state&lt;br /&gt;Cookie state&lt;br /&gt;View state.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Explain differences between ADO and DAO.&lt;/strong&gt;&lt;br /&gt;dao- can access only access database&lt;br /&gt;ado- can access any databases&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How many types of cookies are there?&lt;/strong&gt;&lt;br /&gt;2 types, persistant and impersistant.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How many types of cookies are there?&lt;/strong&gt;&lt;br /&gt;Answer1&lt;br /&gt;Two type of cookeies.&lt;br /&gt;a) single valued eg request.cookies(”UserName”).value=”Mahesh”&lt;br /&gt;b)Multivalued cookies. These are used in the way collections are used.&lt;br /&gt;e.g.&lt;br /&gt;request.cookies(”CookiName”)(”UserName”)=”Mahesh”&lt;br /&gt;request.cookies(”CookiName”)(”UserID”)=”ABC003?&lt;br /&gt;rember no value method in multivalued cooki&lt;br /&gt;&lt;br /&gt;Answer2&lt;br /&gt;There are two types of cookies:&lt;br /&gt;Session cookies&lt;br /&gt;Persistent cookies&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Tell few steps for optimizing (for speed and resource) ASP page/application.&lt;/strong&gt;&lt;br /&gt;Avoid mixing html code with asp code&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Which command using Query Analyzer will give you the version of SQL Server and Operating System?&lt;/strong&gt;&lt;br /&gt;@@VERSION&lt;br /&gt;Returns version, processor architecture, build date, and operating system for the current installation of SQL Server.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How to find the SQL server version from Query Analyser&lt;/strong&gt;&lt;br /&gt;Answer1&lt;br /&gt;To determine which version of Microsoft SQL Server 2005 is running, connect to SQL Server 2005 by using SQL Server Management Studio, and then run the following Transact-SQL statement:&lt;br /&gt;SELECT SERVERPROPERTY(’productversion’), SERVERPROPERTY (’productlevel’), SERVERPROPERTY (’edition’)&lt;br /&gt;The results are:&lt;br /&gt;• The product version (for example, “9.00.1399.06?)&lt;br /&gt;. • The product level (for example, “RTM”).&lt;br /&gt;• The edition (for example, “Enterprise Edition”).&lt;br /&gt;For example, the result looks similar to:&lt;br /&gt;9.00.1399.06 RTM Enterprise Edition&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How to determine which version of SQL Server 2000 is running&lt;/strong&gt;&lt;br /&gt;To determine which version of SQL Server 2000 is running, connect to SQL Server 2000 by using Query Analyzer, and then run the following code:&lt;br /&gt;SELECT SERVERPROPERTY(’productversion’), SERVERPROPERTY (’productlevel’), SERVERPROPERTY (’edition’)&lt;br /&gt;The results are:&lt;br /&gt;• The product version (for example, 8.00.534).&lt;br /&gt;• The product level (for example, “RTM” or “SP2?).&lt;br /&gt;• The edition (for example, “Standard Edition”). For example, the result looks similar to&lt;br /&gt;:&lt;br /&gt;8.00.534 RTM Standard Edition&lt;br /&gt;&lt;br /&gt;Answer2&lt;br /&gt;One can also use SELECT @@Version where the result would look like&lt;br /&gt;Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86)&lt;br /&gt;Oct 14 2005 00:33:37&lt;br /&gt;Copyright (c) 1988-2005 Microsoft Corporation&lt;br /&gt;Express Edition on Windows NT 5.1 (Build 2600: Service Pack 2)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Using query analyzer, name 3 ways you can get an accurate count of the number of records in a table.&lt;/strong&gt;&lt;br /&gt;Answer1.&lt;br /&gt;a. Select count(*) from table1&lt;br /&gt;b. SELECT object_name(id) ,rowcnt FROM sysindexes WHERE indid IN (1,0) AND OBJECTPROPERTY(id, ‘IsUserTable’) = 1&lt;br /&gt;c. exec sp_table_validation @table = ‘authors’&lt;br /&gt;&lt;br /&gt;Answer2.&lt;br /&gt;SELECT count( * ) as totalrecords FROM employee&lt;br /&gt;This will display total records under the name totalrecords in the table employee&lt;br /&gt;use COUNT_BIG&lt;br /&gt;Returns the number of items in a group.&lt;br /&gt;@@ROWCOUNT&lt;br /&gt;Returns the number of rows affected by the last statement.&lt;br /&gt;Use this statement after an SQL select * statement, to retrieve the total number of rows in the table&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7468658770095272063-7033621338996205037?l=dotnet786.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnet786.blogspot.com/feeds/7033621338996205037/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7468658770095272063&amp;postID=7033621338996205037' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/7033621338996205037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/7033621338996205037'/><link rel='alternate' type='text/html' href='http://dotnet786.blogspot.com/2007/05/net-database-interview-q-part-1.html' title='.NET Database interview Q &amp; A Part-1'/><author><name>prashanth</name><uri>http://www.blogger.com/profile/07711599595106933499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7468658770095272063.post-6976288285926448377</id><published>2007-05-30T09:45:00.002-07:00</published><updated>2007-05-30T09:46:07.105-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='net faqs 1'/><title type='text'>net faqs 1</title><content type='html'>&lt;h2&gt;&lt;span class="heading_2"&gt;Microsoft .NET Interview Questions And Answers&lt;/span&gt;&lt;span style="font-weight: 400;"&gt;&lt;span style="font-family:Arial;font-size:100%;"&gt;  &lt;span class="small_headings"&gt;[Microsoft .NET Frequently Asked  Questions ,Microsoft .NET FAQ ]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt; &lt;p class="answers"&gt; &lt;b&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt; &lt;span class="for_questions_blue"&gt;What is the base class of .NET?&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;Base class provides a base set of methods that all  derived classes can use  &lt;/span&gt;&lt;/p&gt; &lt;p class="answers"&gt; &lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;Explain assemblies. &lt;/u&gt; &lt;/span&gt; &lt;/b&gt;&lt;br /&gt;Answer 1:&lt;br /&gt;Assemblies are similar to dll files. Both has the  reusable pieces of code in the form of classes/  functions. Dll needs to be registered but assemblies  have its own metadata.&lt;br /&gt;&lt;br /&gt;Answer 2:&lt;br /&gt;Assembly is a single deployable unit that contains  information about the implementation of classes,  structures and interfaces. it also stores the  information about itself called metadata and includes  name and verison of the assembly, security information,  information about the dependencies and the list of files  that constitute the assembly.&lt;br /&gt;Assembly also contains namespaces. In the .Net  Framework, applications are deployed in the form of  assemblies.&lt;br /&gt;&lt;br /&gt;Answer 3:&lt;br /&gt;An assembly is a single deployable unit that contains  all the information about the implementation of :&lt;br /&gt;- classes&lt;br /&gt;- structures and&lt;br /&gt;- interfaces&lt;br /&gt;&lt;br /&gt;An assembly stores all the information about itself.  This information is called METADATA and include the name  and the verison number of the assembly, security  information, information about the dependencies and a  lost of files that constitute the assembly.&lt;br /&gt;All the application developed using the .NET framework  are made up of assemblies.&lt;br /&gt;Namespaces are also stored in assemblies&lt;br /&gt;&lt;br /&gt;Answer 4:&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;The code in an assembly is partially compiled into CIL,  which is then fully compiled into machine language at  runtime by the CLR.&lt;br /&gt;&lt;br /&gt;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. &lt;/p&gt; &lt;p class="answers"&gt; &lt;span class="for_questions_blue"&gt;&lt;b&gt;Name some of the languages .NET support? &lt;/b&gt; &lt;/span&gt;&lt;br /&gt;Some of the languages that are supported by .NET&lt;br /&gt;1. Visual Basic.NET&lt;br /&gt;2. Visual C#&lt;br /&gt;3. Visual C++ &lt;/p&gt; &lt;p class="answers"&gt; &lt;b class="for_questions_blue"&gt;ADO.NET features? Benefits? Drawbacks? &lt;/b&gt;&lt;br /&gt;Answer 1:&lt;br /&gt;1. Data will be retrieved through Datasets&lt;br /&gt;2. Scalability&lt;br /&gt;&lt;br /&gt;Answer 2:&lt;br /&gt;1. Disconnected Data Architecture&lt;br /&gt;2. Data cached in Datasets&lt;br /&gt;3. Data transfer in XML format&lt;br /&gt;4. Interaction with the database is done through data  commands &lt;/p&gt; &lt;p class="answers"&gt; &lt;b class="for_questions_blue"&gt;How many types of exception handlers are there in .NET? &lt;/b&gt;&lt;br /&gt;Answer 1:&lt;br /&gt;From&lt;br /&gt;MSDN&gt;gt; “How the Runtime Manages Exceptions”&lt;br /&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconexceptionsoverview.asp&lt;br /&gt;The exception information table represents four types of  exception handlers for protected blocks:&lt;br /&gt;A finally handler that executes whenever the block  exits, whether that occurs by normal control flow or by  an unhandled exception.&lt;br /&gt;A fault handler that must execute if an exception  occurs, but does not execute on completion of normal  control flow.&lt;br /&gt;A type-filtered handler that handles any exception of a  specified class or any of its derived classes.&lt;br /&gt;A user-filtered handler that runs user-specified code to  determine whether the exception should be handled by the  associated handler or should be passed to the next  protected block.&lt;br /&gt;&lt;br /&gt;Answer 2:&lt;br /&gt;1. Unstructured Exception Handling&lt;br /&gt;2. Structured Exception Handling&lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;Difference between Panel and GroupBox classes? &lt;/b&gt;&lt;/p&gt; &lt;!--webbot bot="Include" U-Include="_private/tble_firefox.htm" TAG="BODY" startspan --&gt;&lt;!--webbot bot="Include" i-checksum="47638" endspan --&gt;&lt;p class="answers"&gt;Answer 1:&lt;br /&gt;Panel and Group box both can used as container for other  controls like radio buttons and check box.&lt;br /&gt;the difference in panel and group box are Panel&lt;br /&gt;1) In case of panel captions cannot be displayed&lt;br /&gt;2) Can have scroll bars.&lt;br /&gt;&lt;br /&gt;Group box&lt;br /&gt;1) Captions can be displayed.&lt;br /&gt;2) Cannot have a scroll bar&lt;br /&gt;&lt;br /&gt;Answer 2:&lt;br /&gt;Panel is scrollable. In panel you can’t set caption like  Group box.&lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;What is the base class of Button control? &lt;/b&gt;&lt;br /&gt;Listing from visual studio .net &gt; Button Class&lt;br /&gt;System.Object&lt;br /&gt;System.MarshalByRefObject&lt;br /&gt;System.ComponentModel.Component&lt;br /&gt;System.Windows.Forms.Control&lt;br /&gt;System.Windows.Forms.ButtonBase&lt;br /&gt;System.Windows.Forms.Button &lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;What is Response object? How is it related to ASP’s  Response object? &lt;/b&gt;&lt;br /&gt;Response object allows the server to communicate with  the client(browser). It is useful for displaying  information to the user (or) redirecting the client.&lt;br /&gt;Eg: Response.Write(”Hello World”)&lt;br /&gt;&lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;hat is IIS? Have you used it? &lt;/b&gt;&lt;br /&gt;IIS - Internet Information Server&lt;br /&gt;IIS is used to access the ASP.Net web applications&lt;br /&gt;Yes, I used in ASP.NET web applications. &lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;Main differences between ASP and ASP.NET. &lt;/b&gt;&lt;br /&gt;Answer 1:&lt;br /&gt;1. ASP: Code is Interpreted&lt;br /&gt;ASP.NET: Code is Compiled&lt;br /&gt;&lt;br /&gt;2. ASP: Business Logic and Presentation Logic are in a  single file&lt;br /&gt;ASP.NET: Business Logic and Presentation Logic are in  separate files (.cs or .vb) and (.aspx) respectively.&lt;br /&gt;3. ASP: No Web Server Controls&lt;br /&gt;ASP.NET: Web Server Controls supported by strong .NET  Framework&lt;br /&gt;4. ASP: No RAD in Classic ASP&lt;br /&gt;ASP.NET: Supports RAD&lt;br /&gt;&lt;br /&gt;Answer 2:&lt;br /&gt;1.Asp is interpreted&lt;br /&gt;Asp.net is compiled which is faster than asp.&lt;br /&gt;2 Asp.net maintains its own CLR and is managed as it  runs by CLR&lt;br /&gt;Where as asp is unmanaged&lt;br /&gt;3 We can mainatin sessions in state server and sql  server which is Outproc,&lt;br /&gt;where in asp sessions will be last if we restart  webserver or make changes.&lt;br /&gt;4 In asp.net we can configure each application using  web.config file which is availble in application itself  and we have machine.config wherer we can configure all  applications.&lt;br /&gt;In asp we cannot configure single aplication&lt;br /&gt;5 Asp.net we have autopostback event which is not in asp&lt;br /&gt;6 In asp.net we have global.asax where can hadle some  global things which is not in asp.&lt;br /&gt;7 We have well built GUI to work in asp.net&lt;br /&gt;8 We have ado.net and as well as disconnected  architecture in asp.net&lt;br /&gt;9 We have Xcopy deployment in asp.net&lt;br /&gt;10. We can work with any language as code behind  technique in asp.net that supports .net frame work&lt;br /&gt;&lt;br /&gt;Answer 3:&lt;br /&gt;a) asp.net is compiled but ASP is a interpretor or  script only.&lt;br /&gt;b) asp.net is supported more control then the asp.&lt;br /&gt;c) asp.net is more supported even control then the asp.&lt;br /&gt;d) In asp.net if update any component then no need to  shutdown the computer but in asp if loaded any component  then need tobe shutdown the computer.&lt;br /&gt;d) So lastly an asp.net is faster then asp .&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7468658770095272063-6976288285926448377?l=dotnet786.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnet786.blogspot.com/feeds/6976288285926448377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7468658770095272063&amp;postID=6976288285926448377' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/6976288285926448377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/6976288285926448377'/><link rel='alternate' type='text/html' href='http://dotnet786.blogspot.com/2007/05/net-faqs-1.html' title='net faqs 1'/><author><name>prashanth</name><uri>http://www.blogger.com/profile/07711599595106933499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7468658770095272063.post-3080983622988340524</id><published>2007-05-30T09:45:00.001-07:00</published><updated>2007-05-30T09:45:28.577-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='net faqs 2'/><title type='text'>net faqs 2</title><content type='html'>&lt;h2&gt;&lt;span class="heading_2"&gt;Microsoft .NET Interview Questions And Answers&lt;/span&gt;&lt;span style="font-weight: 400;"&gt;&lt;span style="font-family:Arial;font-size:100%;"&gt;  &lt;span class="small_headings"&gt;[Microsoft .NET Frequently Asked  Questions ,Microsoft .NET FAQ ]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt; &lt;p class="answers"&gt; &lt;b&gt;&lt;span class="for_questions_blue"&gt;What are the advantages and drawbacks of using  ADO.NET?&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;Pros&lt;br /&gt;====&lt;br /&gt;ADO.NET is rich with plenty of features that are bound  to impress even the most skeptical of programmers. If  this weren’t the case, Microsoft wouldn’t even be able  to get anyone to use the Beta. What we’ve done here is  come up with a short list of some of the more  outstanding benefits to using the ADO.NET architecture  and the System.Data namespace.&lt;br /&gt;&lt;br /&gt;* Performance – there is no doubt that ADO.NET is  extremely fast. The actual figures vary depending on who  performed the test and which benchmark was being used,  but ADO.NET performs much, much faster at the same tasks  than its predecessor, ADO. Some of the reasons why  ADO.NET is faster than ADO are discussed in the ADO  versus ADO.NET section later in this chapter.&lt;br /&gt;&lt;br /&gt;* Optimized SQL Provider – in addition to performing  well under general circumstances, ADO.NET includes a SQL  Server Data Provider that is highly optimized for  interaction with SQL Server. It uses SQL Server’s own  TDS (Tabular Data Stream) format for exchanging  information. Without question, your SQL Server 7 and  above data access operations will run blazingly fast  utilizing this optimized Data Provider.&lt;br /&gt;&lt;br /&gt;* XML Support (and Reliance) – everything you do in  ADO.NET at some point will boil down to the use of XML.  In fact, many of the classes in ADO.NET, such as the  DataSet, are so intertwined with XML that they simply  cannot exist or function without utilizing the  technology. You’ll see later when we compare and  contrast the “old” and the “new” why the reliance on XML  for internal storage provides many, many advantages,  both to the framework and to the programmer utilizing  the class library.&lt;br /&gt;&lt;br /&gt;* Disconnected Operation Model – the core ADO.NET class,  the DataSet, operates in an entirely disconnected  fashion. This may be new to some programmers, but it is  a remarkably efficient and scalable architecture.  Because the disconnected model allows for the DataSet  class to be unaware of the origin of its data, an  unlimited number of supported data sources can be  plugged into code without any hassle in the future.&lt;br /&gt;&lt;br /&gt;* Rich Object Model – the entire ADO.NET architecture is  built on a hierarchy of class inheritance and interface  implementation. Once you start looking for things you  need within this namespace, you’ll find that the logical  inheritance of features and base class support makes the  entire system extremely easy to use, and very  customizable to suit your own needs. It is just another  example of how everything in the .NET framework is  pushing toward a trend of strong application design and  strong OOP implementations.&lt;br /&gt;&lt;br /&gt;Cons&lt;br /&gt;====&lt;br /&gt;Hard as it may be to believe, there are a couple of  drawbacks or disadvantages to using the ADO.NET  architecture. I’m sure others can find many more faults  than we list here, but we decided to stick with a short  list of some of the more obvious and important  shortcomings of the technology.&lt;br /&gt;&lt;br /&gt;* Managed-Only Access – for a few obvious reasons, and  some far more technical, you cannot utilize the ADO.NET  architecture from anything but managed code. This means  that there is no COM interoperability allowed for  ADO.NET. Therefore, in order to take advantage of the  advanced SQL Server Data Provider and any other feature  like DataSets, XML internal data storage, etc, your code  must be running under the CLR.&lt;br /&gt;&lt;br /&gt;* Only Three Managed Data Providers (so far) –  unfortunately, if you need to access any data that  requires a driver that cannot be used through either an  OLEDB provider or the SQL Server Data Provider, then you  may be out of luck. However, the good news is that the  OLEDB provider for ODBC is available for download from  Microsoft. At that point the down-side becomes one of  performance, in which you are invoking multiple layers  of abstraction as well as crossing the COM InterOp gap,  incurring some initial overhead as well.&lt;br /&gt;&lt;br /&gt;* Learning Curve – despite the misleading name, ADO.NET  is not simply a new version of ADO, nor should it even  be considered a direct successor. ADO.NET should be  thought of more as the data access class library for use  with the .NET framework. The difficulty in learning to  use ADO.NET to its fullest is that a lot of it does seem  familiar. It is this that causes some common pitfalls.  Programmers need to learn that even though some syntax  may appear the same, there is actually a considerable  amount of difference in the internal workings of many  classes. For example (this will be discussed in far more  detail later), an ADO.NET DataSet is nothing at all like  a disconnected ADO RecordSet. Some may consider a  learning curve a drawback, but I consider learning  curves more like scheduling issues. There’s a learning  curve in learning anything new; it’s just up to you to  schedule that curve into your time so that you can learn  the new technology at a pace that fits your schedule. &lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;Why The JavaScript Validation Not Run on the Asp.Net  Button But Run SuccessFully On The HTML Button &lt;/b&gt;&lt;br /&gt;The Asp.Net Button Is post backed on the server &amp; not  yet Submit &amp;amp; when It goes to the server its states is  lost So if we r using javascript in our application so  we always use the Input Button in the asp Button &lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;what is the difference between user control an custom  control? advantages/disadvantages? &lt;/b&gt;&lt;br /&gt;Web user controls Vs Web custom controls&lt;br /&gt;Easier to create Vs Harder to create&lt;br /&gt;Limited support for consumers who use a visual design  tool Vs Full visual design tool support for consumers&lt;br /&gt;A separate copy of the control is required in each  application Vs Only a single copy of the control is  required, in the global assembly cache&lt;br /&gt;Cannot be added to the Toolbox in Visual Studio Vs Can  be added to the Toolbox in Visual Studio&lt;br /&gt;Good for static layout Vs Good for dynamic layout&lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;What’s the difference between Response.Write()  andResponse.Output.Write()? &lt;/b&gt;&lt;br /&gt;Response.Output.Write() allows you to write formatted  output &lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;What is the use of ErrorProvider Control? &lt;/b&gt;&lt;br /&gt;The ErrorProvider control is used to indicate invalid  data on a data entry form. Using this control, you can  attach error messages that display next to the control  when the data is invalid, as seen in the following  image. A red circle with an exclamation point blinks,  and when the user mouses over the icon, the error  message is displayed as a tooltip.&lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;What is CLR? &lt;/b&gt;&lt;br /&gt;Answer 1:&lt;br /&gt;CLR(Common Language Runtime) is the main resource of  .Net Framework. it is collection of services like  garbage collector, exception handler, jit compilers etc.  with the CLR cross language integration is possible.&lt;br /&gt;&lt;br /&gt;Answer 2:&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;Quote:&lt;br /&gt;Managed code is the term used for any code that is  running on .NET Framework.&lt;br /&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;Quote:&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;Advantages of Managed Execution Environments&lt;br /&gt;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&lt;br /&gt;&lt;br /&gt;CLR provides the following benefits for developers:&lt;br /&gt;Vastly simplified development.&lt;br /&gt;Seamless integration of code written in various  languages.&lt;br /&gt;Evidence-based security with code identity.&lt;br /&gt;Assembly-based deployment that eliminates DLL Hell.&lt;br /&gt;Side-by-side versioning of reusable components.&lt;br /&gt;Code reuse through implementation inheritance.&lt;br /&gt;Automatic object lifetime management.&lt;br /&gt;Code access security.&lt;br /&gt;Cross Language Integration.&lt;br /&gt;Self describing objects.&lt;br /&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;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. &lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;What is Delegate and what is it used for ? &lt;/b&gt;&lt;br /&gt;Delegate is kinda like a pointer to a function in C++ or  like an event handler in Java&lt;br /&gt;You can use it to “multicast” which means running  multiple functions in different instances of object  already created.&lt;br /&gt;This is useful when you want your objects to “register”  to an event raised by another object.&lt;br /&gt;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) &lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;How is meant by DLL ? &lt;/b&gt;&lt;br /&gt;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. &lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;Which DLL translate XML to SQL in IIS? &lt;/b&gt;&lt;br /&gt;Sqlisapi.dll &lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;Can anyone tell me about Secure Socket Layer? How to  make use of the technology? &lt;/b&gt;&lt;br /&gt;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.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7468658770095272063-3080983622988340524?l=dotnet786.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnet786.blogspot.com/feeds/3080983622988340524/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7468658770095272063&amp;postID=3080983622988340524' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/3080983622988340524'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/3080983622988340524'/><link rel='alternate' type='text/html' href='http://dotnet786.blogspot.com/2007/05/net-faqs-2.html' title='net faqs 2'/><author><name>prashanth</name><uri>http://www.blogger.com/profile/07711599595106933499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7468658770095272063.post-6856466795941392023</id><published>2007-05-30T09:43:00.000-07:00</published><updated>2007-05-30T09:44:56.076-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='net faqs 3'/><title type='text'>net faqs 3</title><content type='html'>&lt;h2&gt;&lt;span class="heading_2"&gt;Microsoft .NET Interview Questions And Answers&lt;/span&gt;&lt;span style="font-weight: 400;"&gt;&lt;span style="font-family:Arial;font-size:100%;"&gt;  &lt;span class="small_headings"&gt;[Microsoft .NET Frequently Asked  Questions ,Microsoft .NET FAQ ]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt; &lt;p class="answers"&gt; &lt;b&gt;&lt;span class="for_questions_blue"&gt;What is the Differnce Between Response.write &amp;  response.output.Write&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;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.&lt;br /&gt;Response.Write then calls .Write() on it’s internal  TextWriter object:&lt;br /&gt;public void Write(object obj){ this._writer.Write(obj);}&lt;br /&gt;HttpResponse also has a Property called Output that is  of type, yes, TextWriter, so:&lt;br /&gt;public TextWriter get_Output(){ return this._writer; }&lt;br /&gt;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:&lt;br /&gt;Response.Output.Write(”Scott is {0} at {1:d}”, “cool”,DateTime.Now);&lt;br /&gt;But internally, of course, this this is happening:&lt;br /&gt;public virtual void Write(string format, params object[]  arg)&lt;br /&gt;{&lt;br /&gt;this.Write(string.Format(format, arg));&lt;br /&gt;}&lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;Which dll is required to translate XML to SQL in IIS ? &lt;/b&gt;&lt;br /&gt;Microsoft.data.sqlxml.dll &lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;What is an interface and what is an abstract class?  Please, expand by examples of using both. Explain why. &lt;/b&gt;&lt;br /&gt;Answers1:&lt;br /&gt;In a interface class, all methods are abstract without  implementation where as in an abstract class some  methods we can define concrete. In interface, no  accessibility modifiers are allowed. An abstract class  may have accessibility modifiers. Interface and abstract  class are basically a set of rules which u have to  follow in case u r using them(inheriting them).&lt;br /&gt;&lt;br /&gt;Answers2:&lt;br /&gt;Abstract classes are closely related to interfaces. They  are classes that cannot be instantiated, and are  frequently either partially implemented, or not at all  implemented. One key difference between abstract classes  and interfaces is that a class may implement an  unlimited number of interfaces, but may inherit from  only one abstract (or any other kind of) class. A class  that is derived from an abstract class may still  implement interfaces. Abstract classes are useful when  creating components because they allow you specify an  invariant level of functionality in some methods, but  leave the implementation of other methods until a  specific implementation of that class is needed. They  also version well, because if additional functionality  is needed in derived classes, it can be added to the  base class without breaking code.&lt;br /&gt;&lt;br /&gt;Answers3:&lt;br /&gt;Abstract Classes&lt;br /&gt;An abstract class is the one that is not used to create  objects. An abstract class is designed to act as a base  class (to be inherited by other classes). Abstract class  is a design concept in program development and provides  a base upon which other classes are built. Abstract  classes are similar to interfaces. After declaring an  abstract class, it cannot be instantiated on it’s own,  it must be inherited. Like interfaces, abstract classes  can specify members that must be implemented in  inheriting classes. Unlike interfaces, a class can  inherit only one abstract class. Abstract classes can  only specify members that should be implemented by all  inheriting classes.&lt;br /&gt;&lt;br /&gt;Answers4:&lt;br /&gt;An interface looks like a class, but has no  implementation. They’re great for putting together  plug-n-play like architectures where components can be  interchanged at will. Think Firefox Plug-in extension  implementation. If you need to change your design, make  it an interface. However, you may have abstract classes  that provide some default behavior. Abstract classes are  excellent candidates inside of application frameworks.&lt;br /&gt;&lt;br /&gt;Answers5:&lt;br /&gt;One additional key difference between interfaces and  abstract classes (possibly the most important one) is  that multiple interfaces can be implemented by a class,  but only one abstract class can be inherited by any  single class.&lt;br /&gt;Some background on this: C++ supports multiple  inheritance, but C# does not. Multiple inheritance in  C++ has always be controversial, because the resolution  of multiple inherited implementations of the same method  from different base classes is hard to control and  anticipate. C# decided to avoid this problem by allowing  a class to implement multiple interfaces, which do not  contain method implementations, but restricting a class  to have at most a single parent class. Although this can  result in redundant implementations of the same method  when different classes implement the same interface, it  is still an excellent compromise.&lt;br /&gt;Another difference between interfaces and abstract  classes is that an interface can be implemented by an  abstract class, but no class, abstract or otherwise, can  be inherited by an interface.&lt;br /&gt;&lt;br /&gt;Answers6:&lt;br /&gt;What is an Abstract class?&lt;br /&gt;An abstract class is a special kind of class that cannot  be instantiated. So the question is why we need a class  that cannot be instantiated? An abstract class is only  to be sub-classed (inherited from). In other words, it  only allows other classes to inherit from it but cannot  be instantiated. The advantage is that it enforces  certain hierarchies for all the subclasses. In simple  words, it is a kind of contract that forces all the  subclasses to carry on the same hierarchies or  standards.&lt;br /&gt;What is an Interface?&lt;br /&gt;An interface is not a class. It is an entity that is  defined by the word Interface. An interface has no  implementation; it only has the signature or in other  words, just the definition of the methods without the  body. As one of the similarities to Abstract class, it  is a contract that is used to define hierarchies for all  subclasses or it defines specific set of methods and  their arguments. The main difference between them is  that a class can implement more than one interface but  can only inherit from one abstract class. Since C#  doesn’t support multiple inheritance, interfaces are  used to implement multiple inheritance. &lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;What is serialization, how it works in .NET? &lt;/b&gt;&lt;br /&gt;Serialization is when you persist the state of an object  to a storage medium so an exact copy can be re-created  at a later stage.&lt;br /&gt;Serialization is used to save session state in ASP.NET.&lt;br /&gt;Serialization is to copy objects to the Clipboard in  Windows Forms&lt;br /&gt;Serialization is used by remoting to pass objects by  value from one application domain to another&lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;What should one do to make class serializable? &lt;/b&gt;&lt;br /&gt;Answers1:&lt;br /&gt;To make a class serializable is to mark it with the  Serializable attribute as follows.&lt;br /&gt;[Serializable]&lt;br /&gt;public class MyObject {&lt;br /&gt;public int n1 = 0;&lt;br /&gt;public int n2 = 0;&lt;br /&gt;public String str = null;&lt;br /&gt;}&lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;What exactly is being serialized when you perform  serialization? &lt;/b&gt;&lt;br /&gt;The object’s state (values)&lt;br /&gt;&lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;How does output caching work in ASP.NET? &lt;/b&gt;&lt;br /&gt;Output caching is a powerful technique that increases  request/response throughput by caching the content  generated from dynamic pages. Output caching is enabled  by default, but output from any given response is not  cached unless explicit action is taken to make the  response cacheable.&lt;br /&gt;To make a response eligible for output caching, it must  have a valid expiration/validation policy and public  cache visibility. This can be done using either the  low-level OutputCache API or the high-level @  OutputCache directive. When output caching is enabled,  an output cache entry is created on the first GET  request to the page. Subsequent GET or HEAD requests are  served from the output cache entry until the cached  request expires.&lt;br /&gt;The output cache also supports variations of cached GET  or POST name/value pairs.&lt;br /&gt;The output cache respects the expiration and validation  policies for pages. If a page is in the output cache and  has been marked with an expiration policy that indicates  that the page expires 60 minutes from the time it is  cached, the page is removed from the output cache after  60 minutes. If another request is received after that  time, the page code is executed and the page can be  cached again. This type of expiration policy is called  absolute expiration - a page is valid until a certain  time. &lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;What is connection pooling and how do you make your  application use it? &lt;/b&gt;&lt;br /&gt;Opening database connection is a time consuming  operation.&lt;br /&gt;Connection pooling increases the performance of the  applications by reusing the active database connections  instead of create new connection for every request.&lt;br /&gt;Connection pooling Behaviour is controlled by the  connection string parameters.&lt;br /&gt;Follwing the the 4 parameters that control most of the  connection pooling behaviour.&lt;br /&gt;1. Connect Timeout&lt;br /&gt;2. Max Pool Size&lt;br /&gt;3. Min Pool Size&lt;br /&gt;4. Pooling&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7468658770095272063-6856466795941392023?l=dotnet786.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnet786.blogspot.com/feeds/6856466795941392023/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7468658770095272063&amp;postID=6856466795941392023' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/6856466795941392023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/6856466795941392023'/><link rel='alternate' type='text/html' href='http://dotnet786.blogspot.com/2007/05/net-faqs-3.html' title='net faqs 3'/><author><name>prashanth</name><uri>http://www.blogger.com/profile/07711599595106933499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7468658770095272063.post-5790346926796964712</id><published>2007-05-30T09:41:00.000-07:00</published><updated>2007-05-30T09:43:52.538-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='net faqs 4'/><title type='text'>net faqs 4</title><content type='html'>&lt;p class="answers"&gt; &lt;b&gt;&lt;span class="for_questions_blue"&gt;What are different methods of session maintenance in  ASP.NET?&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;3 types:&lt;br /&gt;In-process storage.&lt;br /&gt;Session State Service.&lt;br /&gt;Microsoft SQL Server.&lt;br /&gt;&lt;br /&gt;In-Process Storage&lt;br /&gt;The default location for session state storage is in the  ASP.NET process itself.&lt;br /&gt;&lt;br /&gt;Session State Service&lt;br /&gt;As an alternative to using in-process storage for  session state, ASP.NET provides the ASP.NET State  Service. The State Service gives you an out-of-process  alternative for storing session state that is not tied  quite so closely to ASP. Net's own process.&lt;br /&gt;&lt;br /&gt;To use the State Service, you need to edit the  sessionState element in your ASP.NET application’s  web.config file:&lt;br /&gt;You’ll also need to start the ASP.NET State Service on  the computer that you specified in the  stateConnectionString attribute. The .NET Framework  installs this service, but by default it’s set to manual  startup. If you’re going to depend on it for storing  session state, you’ll want to change that to automatic  startup by using the Services MMC plug-in in the  Administrative Tools group.&lt;br /&gt;&lt;br /&gt;If you make these changes, and then repeat the previous  set of steps, you’ll see slightly different behavior:  session state persists even if you recycle the ASP.NET  process.&lt;br /&gt;&lt;br /&gt;There are two main advantages to using the State  Service. First, it is not running in the same process as  ASP.NET, so a crash of ASP.NET will not destroy session  information. Second, the stateConnectionString that’s  used to locate the State Service includes the TCP/IP  address of the service, which need not be running on the  same computer as ASP.NET. This allows you to share state  information across a web garden (multiple processors on  the same computer) or even across a web farm (multiple  servers running the application). With the default  in-process storage, you can’t share state information  between multiple instances of your application.&lt;br /&gt;&lt;br /&gt;The major disadvantage of using the State Service is  that it’s an external process, rather than part of  ASP.NET. That means that reading and writing session  state is slower than it would be if you kept the state  in-process. And, of course, it’s one more process that  you need to manage. As an example of the extra effort  that this can entail, there is a bug in the initial  release of the State Service that allows a determined  attacker to crash the ASP.NET process remotely. If  you’re using the State Service to store session state,  you should install the patch from Microsoft Security  Bulletin MS02-66, or install SP2 for the .NET Framework.&lt;br /&gt;&lt;br /&gt;Microsoft SQL Server&lt;br /&gt;The final choice for storing state information is to  save it in a Microsoft SQL Server database. To use SQL  Server for storing session state, you need to perform  several setup steps:&lt;br /&gt;&lt;br /&gt;Run the InstallSqlState.sql script on the Microsoft SQL  Server where you intend to store session state. This  script will create the necessary database and database  objects. The .NET Framework installs this script in the  same folder as its compilers and other tools–for  example, C:\WINNT\Microsoft.NET\Framework\v1.0.3705 on a  Windows 2000 computer with the 1.0 version of the  Framework. Edit the sessionState element in the  web.config file for your ASP.NET application as follows:&lt;br /&gt;&lt;br /&gt;Supply the server name, user name, and password for a  SQL Server account that has access to the session state  database in the sqlConnectionString attribute.&lt;br /&gt;Like the State Service, SQL Server lets you share  session state among the processors in a web garden or  the servers in a web farm. But you also get the  additional benefit of persistent storage. Even if the  computer hosting SQL Server crashes and is restarted,  the session state information will still be present in  the database, and will be available as soon as the  database is running again. That’s because SQL Server,  being an industrial-strength database, is designed to  log its operations and protect your data at (almost) all  costs. If you’re willing to invest in SQL Server  clustering, you can keep the session state data  available transparently to ASP.NET even if the primary  SQL Server computer crashes.&lt;br /&gt;&lt;br /&gt;Like the State Service, SQL Server is slower than  keeping session state in process. You also need to pay  additional licensing fees to use SQL Server for session  state in a production application. And, of course, you  need to worry about SQL Server-specific threats such as  the “Slammer” worm.&lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;What is Viewstate? &lt;/b&gt;&lt;br /&gt;A server control’s view state is the accumulation of all  its property values. In order to preserve these values  across HTTP requests, ASP.NET server controls use this  property, which is an instance of the StateBag class, to  store the property values. &lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;Can any object be stored in a Viewstate? &lt;/b&gt;&lt;br /&gt;An object that either is serializable or has a  TypeConverter defined for it can be persisted in  ViewState &lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;What should you do to store an object in a Viewstate? &lt;/b&gt;&lt;br /&gt;Do serialization of convert the object to string &lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;Explain how Viewstate is being formed and how it’s  stored on client. &lt;/b&gt;&lt;br /&gt;The type of ViewState is System.Web.UI.StateBag, which  is a dictionary that stores name/value pairs. ViewState  is persisted to a string variable by the ASP.NET page  framework and sent to the client and back as a hidden  variable. Upon postback, the page framework parses the  input string from the hidden variable and populates the  ViewState property of each control. If a control uses  ViewState for property data instead of a private field,  that property automatically will be persisted across  round trips to the client. (If a property is not  persisted in ViewState, it is good practice to return  its default value on postback.) &lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;What do you know about ADO.NET’s objects and methods? &lt;/b&gt;&lt;br /&gt;ADO.NET provides consistent access to data sources such  as Microsoft SQL Server, as well as data sources exposed  through OLE DB and XML.&lt;br /&gt;Data-sharing consumer applications can use ADO.NET to  connect to these different data sources and retrieve,  manipulate, and update data.&lt;br /&gt;ADO.NET provides first-class support for the  disconnected, n-tier programming environment for which  many new applications are written. &lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;Explain DataSet.AcceptChanges and DataAdapter.Update  methods. &lt;/b&gt;&lt;br /&gt;DataAdapter.Update method Calls the respective INSERT,  UPDATE, or DELETE statements for each inserted, updated,  or deleted row in the DataSet.&lt;br /&gt;DataSet.AcceptChanges method Commits all the changes  made to this row since the last time AcceptChanges was  called. &lt;/p&gt; &lt;p class="answers"&gt;&lt;b class="for_questions_blue"&gt;When we go for html server controls and when we go for  web server controls? &lt;/b&gt;&lt;br /&gt;Server controls are a part of ASP.net. When a server  control is used there will be an extra overhead on the  server to create the control at runtime and accordingly  set the values. HTML controls are static controls and  are easy to use. They are supported is ASP.net.&lt;br /&gt;As a rule, if there is a corresponding HTML control  available instead of the server control, you should  always go for the HTML control as it enhances the server  performance and ensures faster response. Server controls  should be used when it is found that the available HTML  controls are not sufficient to achieve the task.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7468658770095272063-5790346926796964712?l=dotnet786.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnet786.blogspot.com/feeds/5790346926796964712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7468658770095272063&amp;postID=5790346926796964712' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/5790346926796964712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/5790346926796964712'/><link rel='alternate' type='text/html' href='http://dotnet786.blogspot.com/2007/05/net-faqs-4.html' title='net faqs 4'/><author><name>prashanth</name><uri>http://www.blogger.com/profile/07711599595106933499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7468658770095272063.post-9016126266174271445</id><published>2007-05-30T09:32:00.000-07:00</published><updated>2007-05-30T09:33:07.206-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dotnet faqs 1'/><title type='text'>dotnet faqs 1</title><content type='html'>&lt;h2&gt;&lt;span class="heading_2"&gt;.NET Interview Questions And Answers&lt;/span&gt;&lt;span style="font-weight: 400;"&gt;&lt;span style="font-family:Arial;font-size:100%;"&gt;  &lt;span class="small_headings"&gt;[.NET Frequently Asked Questions ,.NET FAQ ]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt; &lt;p&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;&lt;b&gt; &lt;span class="for_questions_blue"&gt;What is .NET?&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;span class="answers"&gt;.NET is essentially a framework for software  development. It is similar in nature to any other  software development framework (J2EE etc) in that it  provides a set of runtime containers/capabilities, and a  rich set of pre-built functionality in the form of class  libraries and APIs&lt;br /&gt;The .NET Framework is an environment for building,  deploying, and running Web Services and other  applications. It consists of three main parts: the  Common Language Runtime, the Framework classes, and  ASP.NET. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;How many languages .NET is supporting now?  &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;When .NET was introduced it came with several languages.  VB.NET, C#, COBOL and Perl, etc. The site  DotNetLanguages.Net says 44 languages are supported. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="for_questions_blue"&gt;&lt;b&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;How is .NET able to support multiple languages?&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt; &lt;span class="answers"&gt;&lt;br /&gt;A language should comply with the Common Language  Runtime standard to become a .NET language. In .NET,  code is compiled to Microsoft Intermediate Language (MSIL  for short). This is called as Managed Code. This Managed  code is run in .NET environment. So after compilation to  this IL the language is not a barrier. A code can call  or use a function written in another language. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;How ASP .NET different from ASP?  &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Scripting is separated from the HTML, Code is compiled  as a DLL, these DLLs can be executed on the server.  &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;What is smart navigation? &lt;/u&gt; &lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;The cursor position is maintained when the page gets  refreshed due to the server side validation and the page  gets refreshed. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="for_questions_blue"&gt;&lt;b&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;What is view state? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt; &lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;The web is stateless. But in ASP.NET, the state of a  page is maintained in the in the page itself  automatically. How? The values are encrypted and saved  in hidden controls. this is done automatically by the  ASP.NET. This can be switched off / on for a single  control &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;How do you validate the controls in an ASP .NET page? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Using special validation controls that are meant for  this. We have Range Validator, Email Validator. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;Can the validation be done in the server side? Or this  can be done only in the Client side? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;/p&gt; &lt;!--webbot bot="Include" U-Include="_private/tble_firefox.htm" TAG="BODY" startspan --&gt;  &lt;table class="tblggl3" align="right" height="141" width="300"&gt; &lt;tbody&gt;&lt;tr&gt; &lt;td&gt; &lt;p align="center"&gt;&lt;i&gt;&lt;span style="font-family:Arial;color:#ff0000;"&gt;&lt;u&gt;&lt;b&gt;Security Tip&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="tblggl4"  style="font-family:Times New Roman;"&gt;Use &lt;strong&gt;Firefox&lt;/strong&gt; instead of Internet  Explorer and &lt;strong&gt;PREVENT Spyware&lt;/strong&gt; !&lt;/span&gt;&lt;/p&gt; &lt;p align="center"&gt;&lt;script type="text/javascript"&gt;&lt;!-- google_ad_client = "pub-7003540323320880"; google_ad_width = 125; google_ad_height = 125; google_ad_format = "125x125_as_rimg"; google_cpa_choice = "CAAQyf6XhAIaCI9aHswlZ6VKKK2293M"; google_ad_channel = "6386700170"; //--&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt; &lt;/script&gt;&lt;iframe name="google_ads_frame" src="http://pagead2.googlesyndication.com/cpa/ads?client=ca-pub-7003540323320880&amp;cpa_choice=CAAQyf6XhAIaCI9aHswlZ6VKKK2293M&amp;amp;oe=windows-1252&amp;dt=1180542744359&amp;amp;lmt=1180098304&amp;format=125x125_as_rimg&amp;amp;output=html&amp;correlator=1180542744312&amp;amp;channel=6386700170&amp;url=http%3A%2F%2Ftechpreparation.com%2Fdotnet-questions-answers1.htm&amp;amp;region=_google_cpa_region_&amp;ref=http%3A%2F%2Ftechpreparation.com%2Fcomputer-interview-questions%2Fdotnet-interview-questions-answers2.htm&amp;amp;cc=55&amp;flash=9&amp;amp;u_h=768&amp;u_w=1024&amp;amp;u_ah=738&amp;u_aw=1024&amp;amp;u_cd=32&amp;u_tz=330&amp;amp;u_his=9&amp;u_java=true&amp;amp;u_nplug=23&amp;u_nmime=91" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" frameborder="0" height="125" scrolling="no" width="125"&gt;&lt;/iframe&gt;&lt;/p&gt; &lt;p&gt;&lt;b&gt;&lt;span class="tblggl4"&gt;Firefox&lt;/span&gt;&lt;/b&gt;&lt;span class="tblggl4"&gt; is &lt;b&gt;free&lt;/b&gt; and is considered the &lt;b&gt;best free&lt;/b&gt;, &lt;b&gt;safe web browser &lt;/b&gt;available today &lt;/span&gt; &lt;script type="text/javascript"&gt;&lt;!-- google_ad_client = "pub-7003540323320880"; google_ad_output = "textlink"; google_ad_format = "ref_text"; google_cpa_choice = "CAAQhaT2_gEaCAS0i9mxCgAgKLGsuIEB"; google_ad_channel = "0030826239"; //--&gt; &lt;/script&gt; &lt;script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt; &lt;/script&gt;&lt;script language="JavaScript1.1" src="http://pagead2.googlesyndication.com/cpa/ads?client=ca-pub-7003540323320880&amp;cpa_choice=CAAQhaT2_gEaCAS0i9mxCgAgKLGsuIEB&amp;amp;oe=windows-1252&amp;dt=1180542744375&amp;amp;lmt=1180098304&amp;prev_fmts=125x125_as_rimg&amp;amp;format=ref_text&amp;output=textlink&amp;amp;correlator=1180542744312&amp;channel=0030826239&amp;amp;url=http%3A%2F%2Ftechpreparation.com%2Fdotnet-questions-answers1.htm&amp;region=_google_cpa_region_&amp;amp;ref=http%3A%2F%2Ftechpreparation.com%2Fcomputer-interview-questions%2Fdotnet-interview-questions-answers2.htm&amp;cc=49&amp;amp;flash=9&amp;u_h=768&amp;amp;u_w=1024&amp;u_ah=738&amp;amp;u_aw=1024&amp;u_cd=32&amp;amp;u_tz=330&amp;u_his=9&amp;amp;u_java=true&amp;u_nplug=23&amp;amp;u_nmime=91"&gt;&lt;/script&gt;&lt;a href="http://pagead2.googlesyndication.com/pagead/iclk?sa=l&amp;num=0&amp;amp;client=ca-ref-pub-7003540323320880&amp;adurl=http://tools.google.com/firefox/toolbar/bundle/%3Fai%3DB5x05JKddRtK3KJewsQKZrYGiA9Ge8heFpPb-AcWNtwEAEAEgrfHXBjgBUOHd82Rg5ZLog9gOmAGShwGgAbWVyP0DqgEKMDAzMDgyNjIzObIBE3RlY2hwcmVwYXJhdGlvbi5jb23IAQHaAThodHRwOi8vdGVjaHByZXBhcmF0aW9uLmNvbS9kb3RuZXQtcXVlc3Rpb25zLWFuc3dlcnMxLmh0beABAoACAagDAw&amp;amp;ai=BQD4SJKddRtK3KJewsQKZrYGiA9Ge8heFpPb-AcWNtwEAEAEgrfHXBjgBUO6vqOv9_____wFg5ZLog9gOmAGShwGgAbWVyP0DqgEKMDAzMDgyNjIzObIBE3RlY2hwcmVwYXJhdGlvbi5jb23IAQHaAThodHRwOi8vdGVjaHByZXBhcmF0aW9uLmNvbS9kb3RuZXQtcXVlc3Rpb25zLWFuc3dlcnMxLmh0beABAoACAagDAw" title="Ads by Google"&gt;Get Firefox with Google Toolbar for better browsing&lt;/a&gt;&lt;/p&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;!--webbot bot="Include" i-checksum="47638" endspan --&gt;&lt;p class="answers"&gt;Client side is done by default. Server side validation  is also possible. We can switch off the client side and  server side can be done.&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt; &lt;u&gt;How to manage pagination in a page?  &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Using pagination option in DataGrid control. We have to  set the number of records for a page, then it takes care  of pagination by itself. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;What is ADO .NET and what is difference between ADO and  ADO.NET? &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;ADO.NET is stateless mechanism. I can treat the ADO.Net  as a separate in-memory database where in I can use  relationships between the tables and select insert and  updates to the database. I can update the actual  database as a batch. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;&lt;span style="color:#0000ff;"&gt;&lt;u&gt;Observations between VB.NET and VC#.NET?  &lt;/u&gt;&lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Choosing a programming language depends on your language  experience and the scope of the application you are  building. While small applications are often created  using only one language, it is not uncommon to develop  large applications using multiple languages.&lt;br /&gt;&lt;br /&gt;For example, if you are extending an application with  existing XML Web services, you might use a scripting  language with little or no programming effort. For  client-server applications, you would probably choose  the single language you are most comfortable with for  the entire application. For new enterprise applications,  where large teams of developers create components and  services for deployment across multiple remote sites,  the best choice might be to use several languages  depending on developer skills and long-term maintenance  expectations.&lt;br /&gt;&lt;br /&gt;The .NET Platform programming languages - including  Visual Basic .NET, Visual C#, and Visual C++ with  managed extensions, and many other programming languages  from various vendors - use .NET Framework services and  features through a common set of unified classes. The  .NET unified classes provide a consistent method of  accessing the platform's functionality. If you learn to  use the class library, you will find that all tasks  follow the same uniform architecture. You no longer need  to learn and master different API architectures to write  your applications.&lt;br /&gt;&lt;br /&gt;In most situations, you can effectively use all of the  Microsoft programming languages. Nevertheless, each  programming language has its relative strengths and you  will want to understand the features unique to each  language. The following sections will help you choose  the right programming language for your application.&lt;br /&gt;&lt;br /&gt;Visual Basic .NET&lt;br /&gt;Visual Basic .NET is the next generation of the Visual  Basic language from Microsoft. With Visual Basic you can  build .NET applications, including Web services and  ASP.NET Web applications, quickly and easily.  Applications made with Visual Basic are built on the  services of the common language runtime and take  advantage of the .NET Framework.&lt;br /&gt;&lt;br /&gt;Visual Basic has many new and improved features such as  inheritance, interfaces, and overloading that make it a  powerful object-oriented programming language. Other new  language features include free threading and structured  exception handling. Visual Basic fully integrates the  .NET Framework and the common language runtime, which  together provide language interoperability, garbage  collection, enhanced security, and improved versioning  support. A Visual Basic support single inheritance and  creates Microsoft intermediate language (MSIL) as input  to native code compilers.&lt;br /&gt;&lt;br /&gt;Visual Basic is comparatively easy to learn and use, and  Visual Basic has become the programming language of  choice for hundreds of thousands of developers over the  past decade. An understanding of Visual Basic can be  leveraged in a variety of ways, such as writing macros  in Visual Studio and providing programmability in  applications such as Microsoft Excel, Access, and Word.&lt;br /&gt;&lt;br /&gt;Visual Basic provides prototypes of some common project  types, including:&lt;br /&gt;• Windows Application.&lt;br /&gt;• Class Library.&lt;br /&gt;• Windows Control Library.&lt;br /&gt;• ASP.NET Web Application.&lt;br /&gt;• ASP.NET Web Service.&lt;br /&gt;• Web Control Library.&lt;br /&gt;• Console Application.&lt;br /&gt;• Windows Service.&lt;br /&gt;• Windows Service.&lt;br /&gt;Visual C# .NET&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Visual C# (pronounced C sharp) is designed to be a fast  and easy way to create .NET applications, including Web  services and ASP.NET Web applications. Applications  written in Visual C# are built on the services of the  common language runtime and take full advantage of the  .NET Framework.&lt;br /&gt;&lt;br /&gt;C# is a simple, elegant, type-safe, object-oriented  language recently developed by Microsoft for building a  wide range of applications. Anyone familiar with C and  similar languages will find few problems in adapting to  C#. C# is designed to bring rapid development to the C++  programmer without sacrificing the power and control  that are a hallmark of C and C++. Because of this  heritage, C# has a high degree of fidelity with C and  C++, and developers familiar with these languages can  quickly become productive in C#. C# provides intrinsic  code trust mechanisms for a high level of security,  garbage collection, and type safety. C# supports single  inheritance and creates Microsoft intermediate language  (MSIL) as input to native code compilers.&lt;br /&gt;&lt;br /&gt;C# is fully integrated with the .NET Framework and the  common language runtime, which together provide language  interoperability, garbage collection, enhanced security,  and improved versioning support. C# simplifies and  modernizes some of the more complex aspects of C and  C++, notably namespaces, classes, enumerations,  overloading, and structured exception handling. C# also  eliminates C and C++ features such as macros, multiple  inheritance, and virtual base classes. For current C++  developers, C# provides a powerful, high-productivity  language alternative.&lt;br /&gt;&lt;br /&gt;Visual C# provides prototypes of some common project  types, including:&lt;br /&gt;• Windows Application.&lt;br /&gt;• Class Library.&lt;br /&gt;• Windows Control Library.&lt;br /&gt;• ASP.NET Web Application.&lt;br /&gt;• ASP.NET Web Service.&lt;br /&gt;• Web Control Library.&lt;br /&gt;• Console Application.&lt;br /&gt;• Windows Service.&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7468658770095272063-9016126266174271445?l=dotnet786.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnet786.blogspot.com/feeds/9016126266174271445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7468658770095272063&amp;postID=9016126266174271445' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/9016126266174271445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/9016126266174271445'/><link rel='alternate' type='text/html' href='http://dotnet786.blogspot.com/2007/05/dotnet-faqs-1.html' title='dotnet faqs 1'/><author><name>prashanth</name><uri>http://www.blogger.com/profile/07711599595106933499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7468658770095272063.post-4444272498136235655</id><published>2007-05-30T09:31:00.002-07:00</published><updated>2007-05-30T09:32:36.229-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dotnet faqs 2'/><title type='text'>dotnet faqs 2</title><content type='html'>&lt;h2&gt;&lt;span class="heading_2"&gt;.NET Interview Questions And Answers&lt;/span&gt;&lt;span style="font-weight: 400;"&gt;&lt;span style="font-family:Arial;font-size:100%;"&gt;  &lt;span class="small_headings"&gt;[.NET Frequently Asked Questions ,.NET FAQ ]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt; &lt;p&gt; &lt;b&gt;&lt;span class="for_questions_blue"&gt;Advantages of migrating to VB.NET ?&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="answers"&gt;Visual Basic .NET has many new and improved language  features — such as inheritance, interfaces, and  overloading that make it a powerful object-oriented  programming language. As a Visual Basic developer, you  can now create multithreaded, scalable applications  using explicit multithreading. Other new language  features in Visual Basic .NET include structured  exception handling, custom attributes, and common  language specification (CLS) compliance.&lt;br /&gt;&lt;br /&gt;The CLS is a set of rules that standardizes such things  as data types and how objects are exposed and  interoperate. Visual Basic .NET adds several features  that take advantage of the CLS. Any CLS-compliant  language can use the classes, objects, and components  you create in Visual Basic .NET. And you, as a Visual  Basic user, can access classes, components, and objects  from other CLS-compliant programming languages without  worrying about language-specific differences such as  data types.&lt;br /&gt;&lt;br /&gt;CLS features used by Visual Basic .NET programs include  assemblies, namespaces, and attributes.&lt;br /&gt;&lt;br /&gt;These are the new features to be stated briefly:&lt;br /&gt;Inheritance&lt;br /&gt;Visual Basic .NET supports inheritance by allowing you  to define classes that serve as the basis for derived  classes. Derived classes inherit and can extend the  properties and methods of the base class. They can also  override inherited methods with new implementations. All  classes created with Visual Basic .NET are inheritable  by default. Because the forms you design are really  classes, you can use inheritance to define new forms  based on existing ones.&lt;br /&gt;&lt;br /&gt;Exception Handling&lt;br /&gt;Visual Basic .NET supports structured exception  handling, using an enhanced version of the  Try...Catch...Finally syntax supported by other  languages such as C++.&lt;br /&gt;&lt;br /&gt;Structured exception handling combines a modern control  structure (similar to Select Case or While) with  exceptions, protected blocks of code, and filters.  Structured exception handling makes it easy to create  and maintain programs with robust, comprehensive error  handlers.&lt;br /&gt;&lt;br /&gt;Overloading&lt;br /&gt;Overloading is the ability to define properties,  methods, or procedures that have the same name but use  different data types. Overloaded procedures allow you to  provide as many implementations as necessary to handle  different kinds of data, while giving the appearance of  a single, versatile procedure. Overriding Properties and  Methods The Overrides keyword allows derived objects to  override characteristics inherited from parent objects.  Overridden members have the same arguments as the  members inherited from the base class, but different  implementations. A member's new implementation can call  the original implementation in the parent class by  preceding the member name with MyBase.&lt;br /&gt;&lt;br /&gt;Constructors and Destructors&lt;br /&gt;Constructors are procedures that control initialization  of new instances of a class. Conversely, destructors are  methods that free system resources when a class leaves  scope or is set to Nothing. Visual Basic .NET supports  constructors and destructors using the Sub New and Sub  Finalize procedures.&lt;br /&gt;&lt;br /&gt;Data Types&lt;br /&gt;Visual Basic .NET introduces three new data types. The  Char data type is an unsigned 16-bit quantity used to  store Unicode characters. It is equivalent to the .NET  Framework System. Char data type. The Short data type, a  signed 16-bit integer, was named Integer in earlier  versions of Visual Basic. The Decimal data type is a  96-bit signed integer scaled by a variable power of 10.  In earlier versions of Visual Basic, it was available  only within a Variant.&lt;br /&gt;&lt;br /&gt;Interfaces&lt;br /&gt;Interfaces describe the properties and methods of  classes, but unlike classes, do not provide  implementations. The Interface statement allows you to  declare interfaces, while the Implements statement lets  you write code that puts the items described in the  interface into practice.&lt;br /&gt;&lt;br /&gt;Delegates&lt;br /&gt;Delegates objects that can call the methods of objects  on your behalf are sometimes described as type-safe,  object-oriented function pointers. You can use delegates  to let procedures specify an event handler method that  runs when an event occurs. You can also use delegates  with multithreaded applications. For details, see  Delegates and the AddressOf Operator.&lt;br /&gt;&lt;br /&gt;Shared Members&lt;br /&gt;Shared members are properties, procedures, and fields  that are shared by all instances of a class. Shared data  members are useful when multiple objects need to use  information that is common to all. Shared class methods  can be used without first creating an object from a  class.&lt;br /&gt;&lt;br /&gt;References&lt;br /&gt;References allow you to use objects defined in other  assemblies. In Visual Basic .NET, references point to  assemblies instead of type libraries. For details, see  References and the Imports Statement. Namespaces  prevent naming conflicts by organizing  classes, interfaces, and methods into hierarchies.&lt;br /&gt;&lt;br /&gt;Assemblies&lt;br /&gt;Assemblies replace and extend the capabilities of type  libraries by, describing all the required files for a  particular component or application. An assembly can  contain one or more namespaces.&lt;br /&gt;&lt;br /&gt;Attributes&lt;br /&gt;Attributes enable you to provide additional information  about program elements. For example, you can use an  attribute to specify which methods in a class should be  exposed when the class is used as a XML Web service.&lt;/span&gt;&lt;/p&gt; &lt;!--webbot bot="Include" U-Include="../_private/tbl_gglapck.htm" TAG="BODY" startspan --&gt;&lt;!--webbot bot="Include" i-checksum="45405" endspan --&gt;&lt;p class="answers"&gt;Multithreading&lt;br /&gt;Visual Basic .NET allows you to write applications that  can perform multiple tasks independently. A task that  has the potential of holding up other tasks can execute  on a separate thread, a process known as multithreading.  By causing complicated tasks to run on threads that are  separate from your user interface, multithreading makes  your applications more responsive to user input.&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt; Using ActiveX Control in .Net &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;ActiveX control is a special type of COM component that  supports a User Interface. Using ActiveX Control in your  .Net Project is even easier than using COM component.  They are bundled usually in .ocx files. Again a proxy  assembly is made by .Net utility AxImp.exe (which we  will see shortly) which your application (or client)  uses as if it is a .Net control or assembly.&lt;br /&gt;&lt;br /&gt;Making Proxy Assembly For ActiveX Control: First, a  proxy assembly is made using AxImp.exe (acronym for  ActiveX Import) by writing following command on Command  Prompt:&lt;br /&gt;&lt;br /&gt;C:&gt; AxImp C:MyProjectsMyControl.ocx&lt;br /&gt;This command will make two dlls, e.g., in case of above  command&lt;br /&gt;&lt;br /&gt;MyControl.dll&lt;br /&gt;AxMyControl.dll&lt;br /&gt;The first file MyControl.dll is a .Net assembly proxy,  which allows you to reference the ActiveX as if it were  non-graphical object.&lt;br /&gt;&lt;br /&gt;The second file AxMyControl.dll is the Windows Control,  which allows u to use the graphical aspects of activex  control and use it in the Windows Form Project.&lt;br /&gt;&lt;br /&gt;Adding Reference of ActiveX Proxy Assembly in your  Project Settings: To add a reference of ActiveX Proxy  Assembly in our Project, do this:&lt;br /&gt;&lt;br /&gt;o Select Project A Add Reference (Select Add Reference  from Project Menu).&lt;br /&gt;o This will show you a dialog box, select .Net tab from  the top of window.&lt;br /&gt;o Click Browse button on the top right of window.&lt;br /&gt;o Select the dll file for your ActiveX Proxy Assembly  (which is MyControl.dll) and click OK o Your selected  component is now shown in the ‘Selected Component’ List  Box. Click OK again Some More On Using COM or ActiveX in  .Net&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.Net only provides wrapper class or proxy assembly  (Runtime Callable Wrapper or RCW) for COM or activeX  control. In the background, it is actually delegating  the tasks to the original COM, so it does not convert  your COM/activeX but just imports them.&lt;br /&gt;&lt;br /&gt;A good thing about .Net is that when it imports a  component, it also imports the components that are  publically referenced by that component. So, if your  component, say MyDataAcsess.dll references ADODB.dll  then .Net will automatically import that COM component  too!&lt;br /&gt;&lt;br /&gt;The Visual Studio.NET does surprise you in a great deal  when u see that it is applying its intellisense (showing  methods, classes, interfaces, properties when placing  dot) even on your imported COM components!!!! Isn’t it a  magic or what?&lt;br /&gt;&lt;br /&gt;When accessing thru RCW, .Net client has no knowledge  that it is using COM component, it is presented just as  another C# assembly.&lt;br /&gt;&lt;br /&gt;U can also import COM component thru command prompt (for  reference see Professional C# by Wrox)&lt;br /&gt;&lt;br /&gt;U can also use your .Net components in COM, i.e., export  your .net components (for reference see Professional C#  by Wrox)&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is Machine.config? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Machine configuration file: The machine.config file  contains settings that apply to the entire computer.  This file is located in the %runtime install path%Config  directory. There is only one machine.config file on a  computer. The Machine.Config file found in the "CONFIG"  subfolder of your .NET Framework install directory (c:WINNTMicrosoft.NETFramework{Version  Number} CONFIG on Windows 2000 installations). The  machine.config, which can be found in the directory  $WINDIR$Microsoft.NETFrameworkv1.0.3705CONFIG, is an  XML-formatted configuration file that specifies  configuration options for the machine. This file  contains, among many other XML elements, a browser Caps  element. Inside this element are a number of other  elements that specify parse rules for the various  User-Agents, and what properties each of these parsing  supports.&lt;br /&gt;&lt;br /&gt;For example, to determine what platform is used, a  filter element is used that specifies how to set the  platform property based on what platform name is found  in the User-Agent string. Specifically, the  machine.config file contains:&lt;br /&gt;&lt;br /&gt;platform=Win95&lt;br /&gt;platform=Win98&lt;br /&gt;platform=WinNT&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;That is, if in the User-Agent string the string "Windows  95" or "Win95" is found, the platform property is set to  Win95. There are a number of filter elements in the  browserCaps element in the machine.config file that  define the various properties for various User-Agent  strings.&lt;br /&gt;&lt;br /&gt;Hence, when using the Request.Browser property to  determine a user's browser features, the user's agent  string is matched up to particular properties in the  machine.config file. The ability for being able to  detect a user's browser's capabilities, then, is based  upon the honesty in the browser's sent User-Agent  string. For example, Opera can be easily configured to  send a User-Agent string that makes it appear as if it's  IE 5.5. In this case from the Web server's perspective  (and, hence, from your ASP.NET Web page's perspective),  the user is visiting using IE 5.5, even though, in  actuality, he is using Opera. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is Web.config? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;In classic ASP all Web site related information was  stored in the metadata of IIS. This had the disadvantage  that remote Web developers couldn't easily make Web-site  configuration changes. For example, if you want to add a  custom 404 error page, a setting needs to be made  through the IIS admin tool, and you're Web host will  likely charge you a flat fee to do this for you. With  ASP.NET, however, these settings are moved into an  XML-formatted text file (Web.config) that resides in the  Web site's root directory. Through Web.config you can  specify settings like custom 404 error pages,  authentication and authorization settings for the Web  sitempilation options for the ASP.NET Web pages, if  tracing should be enabled, etc.&lt;br /&gt;The Web.config file is an XML-formatted file. At the  root level is the tag. Inside this tag you can add a  number of other tags, the most common and useful one  being the system.web tag, where you will specify most of  the Web site configuration parameters. However, to  specify application-wide settings you use the tag.&lt;br /&gt;&lt;br /&gt;For example, if we wanted to add a database connection  string parameter we could have a Web.config file like  so. &lt;/span&gt;&lt;/p&gt; &lt;b class="for_questions_blue"&gt;What is the difference between ADO and ADO.NET? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;ADO uses Recordsets and cursors to access and modify  data. Because of its inherent design, Recordset can  impact performance on the server side by tying up  valuable resources. In addition, COM marshalling - an  expensive data conversion process - is needed to  transmit a Recordset. ADO.NET addresses three important  needs that ADO doesn't address:&lt;br /&gt;&lt;br /&gt;1. Providing a comprehensive disconnected data-access  model, which is crucial to the Web environment&lt;br /&gt;2. Providing tight integration with XML, and&lt;br /&gt;3. Providing seamless integration with the .NET  Framework (e.g., compatibility with the base class  library's type system). From an ADO.NET implementation  perspective, the Recordset object in ADO is eliminated  in the .NET architecture. In its place, ADO.NET has  several dedicated objects led by the DataSet object and  including the DataAdapter, and DataReader objects to  perform specific tasks. In addition, ADO.NET DataSets  operate in disconnected state whereas the ADO RecordSet  objects operated in a fully connected state.&lt;br /&gt;&lt;br /&gt;In ADO, the in-memory representation of data is the  RecordSet. In ADO.NET, it is the dataset. A RecordSet  looks like a single table. If a RecordSet is to contain  data from multiple database tables, it must use a JOIN  query, which assembles the data from the various  database tables into a single result table. In contrast,  a dataset is a collection of one or more tables. The  tables within a dataset are called data tables;  specifically, they are DataTable objects. If a dataset  contains data from multiple database tables, it will  typically contain multiple DataTable objects. That is,  each DataTable object typically corresponds to a single  database table or view. In this way, a dataset can mimic  the structure of the underlying database.&lt;br /&gt;&lt;br /&gt;In ADO you scan sequentially through the rows of the  RecordSet using the ADO MoveNext method. In ADO.NET,  rows are represented as collections, so you can loop  through a table as you would through any collection, or  access particular rows via ordinal or primary key index.  A cursor is a database element that controls record  navigation, the ability to update data, and the  visibility of changes made to the database by other  users. ADO.NET does not have an inherent cursor object,  but instead includes data classes that provide the  functionality of a traditional cursor. For example, the  functionality of a forward-only, read-only cursor is  available in the ADO.NET DataReader object.&lt;br /&gt;&lt;br /&gt;There is one significant difference between disconnected  processing in ADO and ADO.NET. In ADO you communicate  with the database by making calls to an OLE DB provider.  In ADO.NET you communicate with the database through a  data adapter (an OleDbDataAdapter, SqlDataAdapter,  OdbcDataAdapter, or OracleDataAdapter object), which  makes calls to an OLE DB provider or the APIs provided  by the underlying data source&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7468658770095272063-4444272498136235655?l=dotnet786.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnet786.blogspot.com/feeds/4444272498136235655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7468658770095272063&amp;postID=4444272498136235655' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/4444272498136235655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/4444272498136235655'/><link rel='alternate' type='text/html' href='http://dotnet786.blogspot.com/2007/05/dotnet-faqs-2.html' title='dotnet faqs 2'/><author><name>prashanth</name><uri>http://www.blogger.com/profile/07711599595106933499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7468658770095272063.post-8968361255279925666</id><published>2007-05-30T09:31:00.001-07:00</published><updated>2007-05-30T09:31:44.707-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dotnet faqs 3'/><title type='text'>dotnet faqs 3</title><content type='html'>&lt;h2&gt;&lt;span class="heading_2"&gt;NET Interview Questions And Answers&lt;/span&gt;&lt;span style="font-weight: 400;"&gt;&lt;span style="font-family:Arial;font-size:100%;"&gt;  &lt;span class="small_headings"&gt;[.NET Frequently Asked Questions ,.NET FAQ ]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt; &lt;p&gt; &lt;b&gt;&lt;span class="for_questions_blue"&gt;What is the difference between VB and VB.NET?&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="answers"&gt;Now VB.NET is object-oriented language. The following  are some of the differences:&lt;br /&gt;&lt;br /&gt;Data Type Changes&lt;br /&gt;&lt;br /&gt;The .NET platform provides Common Type System to all the  supported languages. This means that all the languages  must support the same data types as enforced by common  language runtime. This eliminates data type  incompatibilities between various languages. For example  on the 32-bit Windows platform, the integer data type  takes 4 bytes in languages like C++ whereas in VB it  takes 2 bytes. Following are the main changes related to  data types in VB.NET:&lt;br /&gt;&lt;br /&gt;. Under .NET the integer data type in VB.NET is also 4  bytes in size.&lt;br /&gt;. VB.NET has no currency data type. Instead it provides  decimal as a replacement.&lt;br /&gt;. VB.NET introduces a new data type called Char. The  char data type takes 2 bytes and can store Unicode  characters.&lt;br /&gt;. VB.NET do not have Variant data type. To achieve a  result similar to variant type you can use Object data  type. (Since every thing in .NET including primitive  data types is an object, a variable of object type can  point to any data type).&lt;br /&gt;. In VB.NET there is no concept of fixed length strings.&lt;br /&gt;. In VB6 we used the Type keyword to declare our  user-defined structures. VB.NET introduces the structure  keyword for the same purpose.&lt;br /&gt;Declaring Variables&lt;br /&gt;Consider this simple example in VB6:&lt;br /&gt;Dim x,y as integer&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In this example VB6 will consider x as variant and y as  integer, which is somewhat odd behavior. VB.NET corrects  this problem, creating both x and y as integers.&lt;br /&gt;&lt;br /&gt;Furthermore, VB.NET allows you to assign initial values  to the variables in the declaration statement itself:&lt;br /&gt;br&gt; Dim str1 as string = Hello&lt;br /&gt;&lt;br /&gt;VB.NET also introduces Read-Only variables. Unlike  constants Read-Only variables can be declared without  initialization but once you assign a value to it, it  cannot be changes.&lt;br /&gt;&lt;br /&gt;Initialization here&lt;br /&gt;Dim readonly x as integer&lt;br /&gt;In later code&lt;br /&gt;X=100&lt;br /&gt;Now x can’t be changed&lt;br /&gt;X=200 *********** Error **********&lt;br /&gt;Property Syntax&lt;br /&gt;In VB.NET, we anymore don't have separate declarations  for Get and Set/Let. Now, everything is done in a single  property declaration. This can be better explained by  the following example.&lt;br /&gt;Public [ReadOnly | WriteOnly] Property PropertyName as  Datatype&lt;br /&gt;Get&lt;br /&gt;Return m_var&lt;br /&gt;End Get&lt;br /&gt;Set&lt;br /&gt;M_var = value&lt;br /&gt;End Set&lt;br /&gt;End Property&lt;br /&gt;Example:&lt;br /&gt;Private _message as String&lt;br /&gt;Public Property Message As String&lt;br /&gt;Get&lt;br /&gt;Return _message&lt;br /&gt;End Get&lt;br /&gt;Set&lt;br /&gt;_message = Value&lt;br /&gt;End Set&lt;br /&gt;End Property&lt;br /&gt;&lt;br /&gt;ByVal is the default - This is a crucial difference  betwen VB 6.0 and VB.NET, where the default in VB 6.0  was by reference. But objects are still passed by  reference.&lt;br /&gt;&lt;br /&gt;Invoking Subroutines In previous versions of VB, only  functions required the use of parentheses around the  parameter list. But in VB.NET all function or subroutine  calls require parentheses around the parameter list.  This also applies, even though the parameter list is  empty.&lt;br /&gt;&lt;br /&gt;User-Defined Types - VB.NET does away with the keyword  Type and replaces it with the keyword Structure&lt;br /&gt;Public Structure Student&lt;br /&gt;Dim strName as String&lt;br /&gt;Dim strAge as Short&lt;br /&gt;End Structure&lt;br /&gt;Procedures and Functions&lt;br /&gt;&lt;br /&gt;In VB6 all the procedure parameters are passed by  reference (ByRef) by default. In VB.NET they are passed  by value (ByVal) by default. Parantheses are required  for calling procedures and functions whether they accept  any parameters or not. In VB6 functions returned values  using syntax like: FuntionName = return_value. In VB.NET  you can use the Return keyword (Return return_value) to  return values or you can continue to use the older  syntax, which is still valid.&lt;br /&gt;&lt;br /&gt;Scoping VB.NET now supports block-level scoping of  variables. If your programs declare all of the variables  at the beginning of the function or subroutine, this  will not be a problem. However, the following VB 6.0  will cause an issue while upgrading to VB .NET&lt;br /&gt;&lt;br /&gt;Do While objRs.Eof&lt;br /&gt;Dim J as Integer&lt;br /&gt;J=0&lt;br /&gt;If objRs("flag")="Y" then&lt;br /&gt;J=1&lt;br /&gt;End If&lt;br /&gt;objRs.MoveNext&lt;br /&gt;Wend&lt;br /&gt;If J Then&lt;br /&gt;Msgbox "Flag is Y"&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;In the above example the variable J will become out of  scope just after the loop, since J was declared inside  the While loop.&lt;br /&gt;&lt;br /&gt;Exception Handling&lt;br /&gt;&lt;br /&gt;The most wanted feature in earlier versions of VB was  its error handling mechanism. The older versions relied  on error handlers such as "On Error GoTo and On Error  Resume Next. VB.NET provides us with a more stuructured  approach. The new block structure allows us to track the  exact error at the right time. The new error handling  mechanism is refered to as  Try...Throw...Catch...Finally. The following example  will explain this new feature.&lt;br /&gt;&lt;br /&gt;Sub myOpenFile()&lt;br /&gt;Try&lt;br /&gt;Open "myFile" For Output As #1&lt;br /&gt;Write #1, myOutput&lt;br /&gt;Catch&lt;br /&gt;Kill "myFile"&lt;br /&gt;Finally&lt;br /&gt;Close #1&lt;br /&gt;End try&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;The keyword SET is gone - Since everything in VB.NET is  an object. So the keyword SET is not at all used to  differentiate between a simple variable assignment and  an object assignment. So, if you have the following  statement in VB 6.0&lt;br /&gt;&lt;br /&gt;Set ObjConn = Nothing&lt;br /&gt;Should be replaced as&lt;br /&gt;ObjConn = Nothing.&lt;br /&gt;Constructor and Destructor&lt;br /&gt;&lt;br /&gt;The constructor procedure is one of the many new  object-oriented features of VB.NET. The constructor in  VB.NET replaces the Class_Initialize in VB 6.0. All  occurance of Class_Initialize in previous versions of VB  should now be placed in a class constructor. In VB.NET,  a constructor is added to a class by adding a procedure  called New. We can also create a class destructor, which  is equivalent to Class_Terminate event in VB 6.0, by  adding a sub-procedure called Finalize to our class.  Usage of Return In VB.NET, we can use the keyword return  to return a value from any function. In previous  versions, we used to assign the value back with the help  of the function name itself. The following example  explains this:&lt;br /&gt;&lt;br /&gt;Public Function Sum (intNum1 as Integer, intNum2 as  Integer) as Integer&lt;br /&gt;Dim intSum as Integer&lt;br /&gt;intSum = intNum1 + intNum2&lt;br /&gt;Return intSum&lt;br /&gt;End Function&lt;br /&gt;Static Methods&lt;br /&gt;&lt;br /&gt;VB.NET now allows you to create static methods in your  classes. Static methods are methods that can be called  without requiring the developer to create instance of  the class. For example, if you had a class named Foo  with the non-static method NonStatic() and the static  method Static(), you could call the Static() method like  so:&lt;br /&gt;&lt;br /&gt;Foo.Static()&lt;br /&gt;&lt;br /&gt;However, non-static methods require than an instance of  the class be created, like so:&lt;br /&gt;&lt;br /&gt;Create an instance of the Foo class&lt;br /&gt;Dim objFoo as New Foo()&lt;br /&gt;Execute the NonStatic() method&lt;br /&gt;ObjFoo.NonStatic()&lt;br /&gt;&lt;br /&gt;To create a static method in a VB.NET, simply prefix the  method definition with the keyword Shared.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is a Strong Name? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;A strong name consists of the assembly's identity its  simple text name, version number, and culture  information (if provided) plus a public key and a  digital signature. It is generated from an assembly file  (the file that contains the assembly manifest, which in  turn contains the names and hashes of all the files that  make up the assembly), using the corresponding private  key. Assemblies with the same strong name are expected  to be identical.&lt;br /&gt;&lt;br /&gt;Strong names guarantee name uniqueness by relying on  unique key pairs. No one can generate the same assembly  name that you can, because an assembly generated with  one private key has a different name than an assembly  generated with another private key.&lt;br /&gt;&lt;br /&gt;When you reference a strong-named assembly, you expect  to get certain benefits, such as versioning and naming  protection. If the strong-named assembly then references  an assembly with a simple name, which does not have  these benefits, you lose the benefits you would derive  from using a strong-named assembly and revert to DLL  conflicts. Therefore, strong-named assemblies can only  reference other strong-named assemblies.&lt;br /&gt;&lt;br /&gt;There are two ways to sign an assembly with a strong  name:&lt;br /&gt;&lt;br /&gt;1. Using the Assembly Linker (Al.exe) provided by the  .NET Framework SDK.&lt;br /&gt;2. Using assembly attributes to insert the strong name  information in your code. You can use either the  AssemblyKeyFileAttribute or the AssemblyKeyNameAttribute,  depending on where the key file to be used is located.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To create and sign an assembly with a strong name using  the Assembly Linker, at the command prompt, type the  following command:&lt;br /&gt;al /out: /keyfile:&lt;br /&gt;&lt;br /&gt;In this command, assembly name is the name of the  assembly to sign with a strong name, module name is the  name of the code module used to create the assembly, and  file name is the name of the container or file that  contains the key pair.&lt;br /&gt;&lt;br /&gt;The following example signs the assembly MyAssembly.dll  with a strong name using the key file sgKey.snk.&lt;br /&gt;&lt;br /&gt;al /out:MyAssembly.dll MyModule.netmodule /keyfile:sgKey.snk&lt;br /&gt;&lt;br /&gt;To sign an assembly with a strong name using attributes&lt;br /&gt;&lt;br /&gt;In a code module, add the AssemblyKeyFileAttribute or  the AssemblyKeyNameAttribute, specifying the name of the  file or container that contains the key pair to use when  signing the assembly with a strong name. The following  code example uses the AssemblyKeyFileAttribute with a  key file called sgKey.snk.&lt;br /&gt;&lt;br /&gt;[Visual Basic]&lt;br /&gt;[C#]&lt;br /&gt;&lt;/span&gt;[&lt;span class="answers"&gt;assembly:AssemblyKeyFileAttribute(@"....sgKey.snk")]&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7468658770095272063-8968361255279925666?l=dotnet786.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnet786.blogspot.com/feeds/8968361255279925666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7468658770095272063&amp;postID=8968361255279925666' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/8968361255279925666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/8968361255279925666'/><link rel='alternate' type='text/html' href='http://dotnet786.blogspot.com/2007/05/dotnet-faqs-3.html' title='dotnet faqs 3'/><author><name>prashanth</name><uri>http://www.blogger.com/profile/07711599595106933499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7468658770095272063.post-4512634344201912730</id><published>2007-05-30T09:30:00.000-07:00</published><updated>2007-05-30T09:31:01.528-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dotnet faqs 4'/><title type='text'>dotnet faqs 4</title><content type='html'>&lt;h2&gt;&lt;span class="heading_2"&gt;.NET Interview Questions And Answers&lt;/span&gt;&lt;span style="font-weight: 400;"&gt;&lt;span style="font-family:Arial;font-size:100%;"&gt;  &lt;span class="small_headings"&gt;[.NET Frequently Asked Questions ,.NET FAQ ]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt; &lt;p&gt; &lt;b&gt;&lt;span class="for_questions_blue"&gt;What is a Manifest?&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="answers"&gt;An assembly manifest contains all the metadata needed to  specify the assembly's version requirements and security  identity, and all metadata needed to define the scope of  the assembly and resolve references to resources and  classes. The assembly manifest can be stored in either a  PE (Portable Executable) file (an .exe or .dll) with  Microsoft intermediate language (MSIL) code or in a  standalone PE (Portable Executable) file that contains  only assembly manifest information. The following table  shows the information contained in the assembly  manifest. The first four items the assembly name,  version number, culture, and strong name information  make up the assembly's identity.&lt;br /&gt;&lt;br /&gt;Assembly name: A text string specifying the assembly's  name.&lt;br /&gt;&lt;br /&gt;Version number: A major and minor version number, and a  revision and build number. The common language runtime  uses these numbers to enforce version policy.&lt;br /&gt;&lt;br /&gt;Culture: Information on the culture or language the  assembly supports. This information should be used only  to designate an assembly as a satellite assembly  containing culture- or language-specific information.  (An assembly with culture information is automatically  assumed to be a satellite assembly.) Strong name  information: The public key from the publisher if the  assembly has been given a strong name. List of all files  in the assembly:&lt;br /&gt;&lt;br /&gt;A hash of each file contained in the assembly and a file  name. Note that all files that make up the assembly must  be in the same directory as the file containing the  assembly manifest.&lt;br /&gt;&lt;br /&gt;Type reference information: Information used by the  runtime to map a type reference to the file that  contains its declaration and implementation. This is  used for types that are exported from the assembly.&lt;br /&gt;&lt;br /&gt;Information on referenced assemblies: A list of other  assemblies that are statically referenced by the  assembly. Each reference includes the dependent  assembly's name, assembly metadata (version, culture,  operating system, and so on), and public key, if the  assembly is strong named.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;Creating a Key Pair? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;You can create a key pair using the Strong Name tool (Sn.exe).  Key pair files usually have an .snk extension. To create  a key pair At the command prompt, type the following  command:&lt;br /&gt;&lt;br /&gt;sn k&lt;br /&gt;&lt;br /&gt;In this command, file name is the name of the output  file containing the key pair. The following example  creates a key pair called sgKey.snk.&lt;br /&gt;&lt;br /&gt;sn -k sgKey.snk &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is the difference between "using System.Data;" and  directly adding the reference from "Add References  Dialog Box"?  &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;When u compile a program using command line, u add the  references using /r switch. When you compile a program  using Visual Studio, it adds those references to our  assembly, which are added using "Add Reference" dialog  box. While "using" statement facilitates us to use  classes without using their fully qualified names.&lt;br /&gt;&lt;br /&gt;For example: if u have added a reference to "System.Data.SqlClient"  using "Add Reference" dialog box then u can use  SqlConnection class like this:&lt;br /&gt;&lt;br /&gt;System.Data.SqlClient.SqlConnection&lt;br /&gt;&lt;br /&gt;But if u add a "using System.Data.SqlClient" statement  at the start of ur code then u can directly use  SqlConnection class.&lt;br /&gt;On the other hand if u add a reference using "using  System.Data.SqlClient" statement, but don't add it using  "Add Reference" dialog box, Visual Studio will give  error message while we compile the program. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is GAC? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;The global assembly cache stores assemblies specifically  designated to be shared by several applications on the  computer. You should share assemblies by installing them  into the global assembly cache only when you need to.  Assemblies deployed in the global assembly cache must  have a strong name. When an assembly is added to the  global assembly cache, integrity checks are performed on  all files that make up the assembly. The cache performs  these integrity checks to ensure that an assembly has  not been tampered with, for example, when a file has  changed but the manifest does not reflect the change.  Use a developer tool called the Global Assembly Cache  tool (Gacutil.exe), provided by the .NET Framework SDK  or Use Windows Explorer to drag assemblies into the  cache. To install a strong-named assembly into the  global assembly cache At the command prompt, type the  following command:&lt;br /&gt;&lt;br /&gt;gacutil I&lt;br /&gt;&lt;br /&gt;In this command, assembly name is the name of the  assembly to install in the global assembly cache. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is a Metadata? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Metadata is information about a PE. In COM, metadata is  communicated through non-standardized type libraries.&lt;br /&gt;&lt;br /&gt;In .NET, this data is contained in the header portion of  a COFF-compliant PE and follows certain guidelines;&lt;br /&gt;it contains information such as the assembly’s name,  version, language (spoken, not computera.k.a., culture),  what external types are referenced, what internal types  are exposed, methods, properties, classes, and much  more.&lt;br /&gt;&lt;br /&gt;The CLR uses metadata for a number of specific purposes.  Security is managed through a public key in the PE’s  header.&lt;br /&gt;&lt;br /&gt;Information about classes, modules, and so forth allows  the CLR to know in advance what structures are  necessary. The class loader component of the CLR uses  metadata to locate specific classes within assemblies,  either locally or across networks.&lt;br /&gt;&lt;br /&gt;Just-in-time (JIT) compilers use the metadata to turn IL  into executable code.&lt;br /&gt;&lt;br /&gt;Other programs take advantage of metadata as well.&lt;br /&gt;&lt;br /&gt;A common example is placing a Microsoft Word document on  a Windows 2000 desktop. If the document file has  completed comments, author, title, or other Properties  metadata, the text is displayed as a tool tip when a  user hovers the mouse over the document on the desktop.  You can use the Ildasm.exe utility to view the metadata  in a PE. Literally, this tool is an IL disassembler. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is managed code and managed data? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Managed code is code that is written to target the  services of the Common Language Runtime.&lt;br /&gt;In order to target these services, the code must provide  a minimum level of information (metadata) to the  runtime.&lt;br /&gt;All C#, Visual Basic .NET, and JScript .NET code is  managed by default.&lt;br /&gt;Visual Studio .NET C++ code is not managed by default,  but the compiler can produce managed code by specifying  a command-line switch (/CLR).&lt;br /&gt;Closely related to managed code is managed data--data  that is allocated and de- allocated by the Common  Language Runtime's garbage collector. C#, Visual Basic,  and JScript .NET data is managed by default.&lt;br /&gt;C# data can, however, be marked as unmanaged through the  use of special keywords.&lt;br /&gt;Visual Studio .NET C++ data is unmanaged by default  (even when using the /CLR switch), but when using  Managed Extensions for C++, a class can be marked as  managed using the __gc keyword. As the name suggests,  this means that the memory for instances of the class is  managed by the garbage collector.&lt;br /&gt;In addition, the class becomes a full participating  member of the .NET Framework community, with the  benefits and restrictions that it brings. An example of  a benefit is proper interoperability with classes  written in other languages (for example, a managed C++  class can inherit from a Visual Basic class).&lt;br /&gt;An example of a restriction is that a managed class can  only inherit from one base class.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is .NET / .NET Framework? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;It is a Framework in which Windows applications may be  developed and run. The Microsoft .NET Framework is a  platform for building, deploying, and running Web  Services and applications. It provides a highly  productive, standards-based, multi-language environment  for integrating existing investments with  next-generation applications and services as well as the  agility to solve the challenges of deployment and  operation of Internet-scale applications. The .NET  Framework consists of three main parts: the common  language runtime, a hierarchical set of unified class  libraries, and a componentized version of Active Server  Pages called ASP.NET. The .NET Framework provides a new  programming model and rich set of classes designed to  simplify application development for Windows, the Web,  and mobile devices. It provides full support for XML Web  services, contains robust security features, and  delivers new levels of programming power. The .NET  Framework is used by all Microsoft languages including  Visual C#, Visual J#, and Visual C++. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is Reflection? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;It extends the benefits of metadata by allowing  developers to inspect and use it at runtime. For  example, dynamically determine all the classes contained  in a given assembly and invoke their methods. Reflection  provides objects that encapsulate assemblies, modules,  and types. You can use reflection to dynamically create  an instance of a type, bind the type to an existing  object, or get the type from an existing object. You can  then invoke the type's methods or access its fields and  properties. Namespace: System.Reflection &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is "Common Type System" (CTS)? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;CTS defines all of the basic types that can be used in  the .NET Framework and the operations performed on those  type.&lt;br /&gt;All this time we have been talking about language  interoperability, and .NET Class Framework. None of this  is possible without all the language sharing the same  data types. What this means is that an int should mean  the same in VB, VC++, C# and all other .NET compliant  languages. This is achieved through introduction of  Common Type System (CTS). &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is "Common Language Specification" (CLS)? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;CLS is the collection of the rules and constraints that  every language (that seeks to achieve .NET  compatibility) must follow. It is a subsection of CTS  and it specifies how it shares and extends one another  libraries. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is "Common Language Runtime" (CLR)? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;CLR is .NET equivalent of Java Virtual Machine (JVM). It  is the runtime that converts a MSIL code into the host  machine language code, which is then executed  appropriately. The CLR is the execution engine for .NET  Framework applications. It provides a number of  services, including:&lt;br /&gt;&lt;br /&gt;- Code management (loading and execution)&lt;br /&gt;- Application memory isolation&lt;br /&gt;- Verification of type safety&lt;br /&gt;- Conversion of IL to native code.&lt;br /&gt;- Access to metadata (enhanced type information)&lt;br /&gt;- Managing memory for managed objects&lt;br /&gt;- Enforcement of code access security&lt;br /&gt;- Exception handling, including cross-language  exceptions&lt;br /&gt;- Interoperation between managed code, COM objects, and  pre-existing DLL's (unmanaged code and data)&lt;br /&gt;- Automation of object layout&lt;br /&gt;- Support for developer services (profiling, debugging,  and so on).&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7468658770095272063-4512634344201912730?l=dotnet786.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnet786.blogspot.com/feeds/4512634344201912730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7468658770095272063&amp;postID=4512634344201912730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/4512634344201912730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/4512634344201912730'/><link rel='alternate' type='text/html' href='http://dotnet786.blogspot.com/2007/05/dotnet-faqs-4.html' title='dotnet faqs 4'/><author><name>prashanth</name><uri>http://www.blogger.com/profile/07711599595106933499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7468658770095272063.post-7605051177986115626</id><published>2007-05-30T09:29:00.002-07:00</published><updated>2007-05-30T09:30:28.834-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dotnet faqs 5'/><title type='text'>dotnet faqs 5</title><content type='html'>&lt;h2&gt;&lt;span class="heading_2"&gt;NET Interview Questions And Answers&lt;/span&gt;&lt;span style="font-weight: 400;"&gt;&lt;span style="font-family:Arial;font-size:100%;"&gt;  &lt;span class="small_headings"&gt;[.NET Frequently Asked Questions ,.NET FAQ ]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt; &lt;p&gt; &lt;b&gt;&lt;span class="for_questions_blue"&gt;What are Attributes?&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="answers"&gt;Attributes are declarative tags in code that insert  additional metadata into an assembly. There exist two  types of attributes in the .NET Framework: Predefined  attributes such as AssemblyVersion, which already exist  and are accessed through the Runtime Classes; and custom  attributes, which you write yourself by extending the  System.Attribute class. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What are the Types of Assemblies? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Assemblies are of two types:&lt;br /&gt;1. Private Assemblies&lt;br /&gt;2. Shared Assemblies&lt;br /&gt;Private Assemblies: The assembly is intended only for  one application. The files of that assembly must be  placed in the same folder as the application or in a sub  folder. No other application will be able to make a call  to this assembly. The advantage of having a private  assembly is that, it makes naming the assembly very  easy, since the developer need not worry about name  clashes with other assemblies. As long as the assembly  has a unique name within the concerned application,  there won't be any problems.&lt;br /&gt;Shared Assemblies: If the assembly is to be made into a  Shared Assembly, then the naming conventions are very  strict since it has to be unique across the entire  system. The naming conventions should also take care of  newer versions of the component being shipped. These are  accomplished by giving the assembly a Shared Name. Then  the assembly is placed in the global assembly cache,  which is a folder in the file system reserved for shared  assemblies. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is an Intermediate language? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Assemblies are made up of IL code modules and the  metadata that describes them. Although programs may be  compiled via an IDE or the command line, in fact, they  are simply translated into IL, not machine code. The  actual machine code is not generated until the function  that requires it is called. This is the just-in-time, or  JIT, compilation feature of .NET. JIT compilation  happens at runtime for a variety of reasons, one of the  most ambitious being Microsoft's desire for  cross-platform .NET adoption. If a CLR is built for  another operating system (UNIX or Mac), the same  assemblies will run in addition to the Microsoft  platforms. The hope is that .NET assemblies are  write-once-run-anywhere applications. This is a .NET  feature that works behind-the-scenes, ensuring that  developers are not limited to writing applications for  one single line of products. No one has demonstrated  whether or not this promise will ever truly materialize.&lt;br /&gt;&lt;br /&gt;CTS/CLS&lt;br /&gt;&lt;br /&gt;The MSIL Instruction Set Specification is included with  the .NET SDK, along with the IL Assembly Language  Programmers Reference. If a developer wants to write  custom .NET programming languages, these are the  necessary specifications and syntax. The CTS and CLS  define the types and syntaxes that every .NET language  needs to embrace. An application may not expose these  features, but it must consider them when communicating  through IL.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="answers"&gt;ASP.NET Authentication Providers and IIS Security&lt;br /&gt;&lt;br /&gt;ASP.NET implements authentication using authentication  providers, which are code modules that verify  credentials and implement other security functionality  such as cookie generation. ASP.NET supports the  following three authentication providers:&lt;br /&gt;&lt;br /&gt;Forms Authentication: Using this provider causes  unauthenticated requests to be redirected to a specified  HTML form using client side redirection. The user can  then supply logon credentials, and post the form back to  the server. If the application authenticates the request  (using application-specific logic), ASP.NET issues a  cookie that contains the credentials or a key for  reacquiring the client identity. Subsequent requests are  issued with the cookie in the request headers, which  means that subsequent authentications are unnecessary.&lt;br /&gt;&lt;br /&gt;Passport Authentication: This is a centralized  authentication service provided by Microsoft that offers  a single logon facility and membership services for  participating sites. ASP.NET, in conjunction with the  Microsoft® Passport software development kit (SDK),  provides similar functionality as Forms Authentication  to Passport users.&lt;br /&gt;&lt;br /&gt;Windows Authentication: This provider utilizes the  authentication capabilities of IIS. After IIS completes  its authentication, ASP.NET uses the authenticated  identity's token to authorize access.&lt;br /&gt;&lt;br /&gt;To enable a specified authentication provider for an  ASP.NET application, you must create an entry in the  application's configuration file as follows:&lt;br /&gt;// web.config file &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is the difference between ASP and ASP.NET? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;ASP is interpreted. ASP.NET Compiled event base  programming.&lt;br /&gt;Control events for text button can be handled at client  javascript only. Since we have server controls events  can handle at server side.&lt;br /&gt;More error handling.&lt;br /&gt;&lt;br /&gt;ASP .NET has better language support, a large set of new  controls and XML based components, and better user  authentication.&lt;br /&gt;&lt;br /&gt;ASP .NET provides increased performance by running  compiled code.&lt;br /&gt;&lt;br /&gt;ASP .NET code is not fully backward compatible with ASP.&lt;br /&gt;&lt;br /&gt;ASP .NET also contains a new set of object oriented  input controls, like programmable list boxes, validation  controls. A new data grid control supports sorting, data  paging, and everything you expect from a dataset  control. The first request for an ASP.NET page on the  server will compile the ASP .NET code and keep a cached  copy in memory. The result of this is greatly increased  performance.&lt;br /&gt;&lt;br /&gt;ASP .NET is not fully compatible with earlier versions  of ASP, so most of the old ASP code will need some  changes to run under ASP .NET. To overcome this problem,&lt;br /&gt;&lt;br /&gt;ASP .NET uses a new file extension ".aspx". This will  make ASP .NET applications able to run side by side with  standard ASP applications on the same server.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;Using COM Component in .Net ?&lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;As most of you know that .Net does not encourage the  development of COM components and provides a different  solution to making reusable components through  Assemblies. But, there are a lot of COM components  present which our .Net application might need to use.  Fortunately, .Net provides an extremely simple approach  to achieve this. This is achieved by using ‘Wrapper  Classes’ and ‘Proxy Components’. .Net wraps the COM  component into .Net assembly technically called ‘Runtime  Callable Wrapper’ or RCW. Then u can call and use your  COM component just as a .Net (or C#, if u are using C#)  Assembly. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is an assembly? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;An assembly is the primary building block of a .NET  Framework application. It is a collection of  functionality that is built, versioned, and deployed as  a single implementation unit (as one or more files). All  managed types and resources are marked either as  accessible only within their implementation unit, or as  accessible by code outside that unit. .NET Assembly  contains all the metadata about the modules, types, and  other elements it contains in the form of a manifest.  The CLR loves assemblies because differing programming  languages are just perfect for creating certain kinds of  applications. For example, COBOL stands for Common  Business-Oriented Language because it’s tailor-made for  creating business apps. However, it’s not much good for  creating drafting programs. Regardless of what language  you used to create your modules, they can all work  together within one Portable Executable Assembly.  There’s a hierarchy to the structure of .NET code. That  hierarchy is Assembly - &gt; Module -&gt; Type -&gt; Method."  Assemblies can be static or dynamic. Static assemblies  can include .NET Framework types (interfaces and  classes), as well as resources for the assembly  (bitmaps, JPEG files, resource files, and so on). Static  assemblies are stored on disk in portable executable  (PE) files. You can also use the .NET Framework to  create dynamic assemblies, which are run directly from  memory and are not saved to disk before execution. You  can save dynamic assemblies to disk after they have  executed. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is a Web Service? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;A web service is a software component that exposes  itself through the open communication channels of the  Internet. Applications running on remote machines, on  potentially different platforms, can access these  components in a language and platform-independent  manner. A Web Service is a group of functions, packaged  together for use in a common framework throughout a  network. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;webFarm Vs webGardens &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;A web farm is a multi-server scenario. So we may have a  server in each state of US. If the load on one server is  in excess then the other servers step in to bear the  brunt.&lt;br /&gt;How they bear it is based on various models.&lt;br /&gt;1. RoundRobin. (All servers share load equally)&lt;br /&gt;2. NLB (economical)&lt;br /&gt;3. HLB (expensive but can scale up to 8192 servers)&lt;br /&gt;4. Hybrid (of 2 and 3).&lt;br /&gt;5. CLB (Component load balancer).&lt;br /&gt;A web garden is a multi-processor setup. i.e., a single  server (not like the multi server above).&lt;br /&gt;How to implement webfarms in .Net:&lt;br /&gt;Go to web.config and Here for mode = you have 4 options.&lt;br /&gt;a) Say mode=inproc (non web farm but fast when you have  very few customers).&lt;br /&gt;b) Say mode=StateServer (for webfarm)&lt;br /&gt;c) Say mode=SqlServer (for webfarm)&lt;br /&gt;Whether to use option b or c depends on situation.  StateServer is faster but SqlServer is more reliable and  used for mission critical applications.&lt;br /&gt;How to use webgardens in .Net:&lt;br /&gt;Go to web.config and Change the false to true. You have  one more attribute that is related to webgarden in the  same tag called cpuMask.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="answers"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7468658770095272063-7605051177986115626?l=dotnet786.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnet786.blogspot.com/feeds/7605051177986115626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7468658770095272063&amp;postID=7605051177986115626' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/7605051177986115626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/7605051177986115626'/><link rel='alternate' type='text/html' href='http://dotnet786.blogspot.com/2007/05/dotnet-faqs-5.html' title='dotnet faqs 5'/><author><name>prashanth</name><uri>http://www.blogger.com/profile/07711599595106933499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7468658770095272063.post-7390492761268796839</id><published>2007-05-30T09:29:00.001-07:00</published><updated>2007-05-30T09:29:47.842-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dotnet faqs 6'/><title type='text'>dotnet faqs 6</title><content type='html'>&lt;h2&gt;&lt;span class="heading_2"&gt;.NET Interview Questions And Answers&lt;/span&gt;&lt;span style="font-weight: 400;"&gt;&lt;span style="font-family:Arial;font-size:100%;"&gt;  &lt;span class="small_headings"&gt;[.NET Frequently Asked Questions ,.NET FAQ ]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt; &lt;p&gt; &lt;b&gt;&lt;span class="for_questions_blue"&gt;What is the difference between a namespace and  assembly name?&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="answers"&gt;A namespace is a logical naming scheme for types in  which a simple type name, such as MyType, is preceded  with a dot-separated hierarchical name. Such a naming  scheme is completely under control of the developer. For  example, types MyCompany.FileAccess.A and  MyCompany.FileAccess.B might be logically expected to  have functionally related to file access. The .NET  Framework uses a hierarchical naming scheme for grouping  types into logical categories of related functionality,  such as the ASP.NET application framework, or remoting  functionality. Design tools can make use of namespaces  to make it easier for developers to browse and reference  types in their code. The concept of a namespace is not  related to that of an assembly. A single assembly may  contain types whose hierarchical names have different  namespace roots, and a logical namespace root may span  multiple assemblies. In the .NET Framework, a namespace  is a logical design-time naming convenience, whereas an  assembly establishes the name scope for types at run  time. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What’s a Windows process? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;It’s an application that’s running and had been  allocated memory. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What’s typical about a Windows process in regards to  memory allocation? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Each process is allocated its own block of available RAM  space, no process can access another process’ code or  data. If the process crashes, it dies alone without  taking the entire OS or a bunch of other applications  down. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;Explain what relationship is between a Process,  Application Domain, and Application? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Each process is allocated its own block of available RAM  space, no process can access another process’ code or  data. If the process crashes, it dies alone without  taking the entire OS or a bunch of other applications  down.&lt;br /&gt;A process is an instance of a running application. An  application is an executable on the hard drive or  network. There can be numerous processes launched of the  same application (5 copies of Word running), but 1  process can run just 1 application. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What are possible implementations of distributed  applications in .NET? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;.NET Remoting and ASP.NET Web Services. If we talk about  the Framework Class Library, noteworthy classes are in  System.Runtime.Remoting and System.Web.Services. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What are the consideration in deciding to use .NET  Remoting or ASP.NET Web Services? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Remoting is a more efficient communication exchange when  you can control both ends of the application involved in  the communication process. Web Services provide an  open-protocol-based exchange of information. Web Services  are best when you need to communicate with an external  organization or another (non-.NET) technology. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What’s a proxy of the server object in .NET Remoting? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;It’s a fake copy of the server object that resides on  the client side and behaves as if it was the server. It  handles the communication between real server object and  the client object. This process is also known as  marshaling.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What are remotable objects in .NET Remoting? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Remotable objects are the objects that can be marshaled  across the application domains. You can marshal by  value, where a deep copy of the object is created and  then passed to the receiver. You can also marshal by  reference, where just a reference to an existing object  is passed. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What are channels in .NET Remoting? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Channels represent the objects that transfer the other  serialized objects from one application domain to  another and from one computer to another, as well as one  process to another on the same box. A channel must exist  before an object can be transferred. &lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What security measures exist for .NET Remoting in  System.Runtime.Remoting? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;None. Security should be taken care of at the  application level. Cryptography and other security  techniques can be applied at application or server  level. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is a formatter? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;A formatter is an object that is responsible for  encoding and serializing data into messages on one end,  and deserializing and decoding messages into data on the  other end. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;Choosing between HTTP and TCP for protocols and Binary  and SOAP for formatters, what are the trade-offs? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Binary over TCP is the most effiecient, SOAP over HTTP  is the most interoperable. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What’s SingleCall activation mode used for? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;If the server object is instantiated for responding to  just one single request, the request should be made in  SingleCall mode. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What’s Singleton activation mode? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;A single object is instantiated regardless of the number  of clients accessing it. Lifetime of this object is  determined by lifetime lease. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;How do you define the lease of the object? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;By implementing ILease interface when writing the class  code.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b&gt;&lt;span class="for_questions_blue"&gt;Can you configure a .NET Remoting object via XML file? &lt;/span&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Yes, via machine.config and application level .config  file (or web.config in ASP.NET). Application-level XML  settings take precedence over machine.config. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;How can you automatically generate interface for the  remotable object in .NET with Microsoft tools? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Use the Soapsuds tool. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is Delegation? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;A delegate acts like a strongly type function pointer.  Delegates can invoke the methods that they reference  without making explicit calls to those methods.&lt;br /&gt;Delegate is an entity that is entrusted with the task of  representation, assign or passing on information. In  code sense, it means a Delegate is entrusted with a  Method to report information back to it when a certain  task (which the Method expects) is accomplished outside  the Method's class.&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7468658770095272063-7390492761268796839?l=dotnet786.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnet786.blogspot.com/feeds/7390492761268796839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7468658770095272063&amp;postID=7390492761268796839' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/7390492761268796839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/7390492761268796839'/><link rel='alternate' type='text/html' href='http://dotnet786.blogspot.com/2007/05/dotnet-faqs-6.html' title='dotnet faqs 6'/><author><name>prashanth</name><uri>http://www.blogger.com/profile/07711599595106933499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7468658770095272063.post-3466182763311869873</id><published>2007-05-30T09:28:00.001-07:00</published><updated>2007-05-30T09:29:27.170-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dotnet faqs 7'/><title type='text'>dotnet faqs 7</title><content type='html'>&lt;h2&gt;&lt;span class="heading_2"&gt;.NET Interview Questions And Answers&lt;/span&gt;&lt;span style="font-weight: 400;"&gt;&lt;span style="font-family:Arial;font-size:100%;"&gt;  &lt;span class="small_headings"&gt;[.NET Frequently Asked Questions ,.NET FAQ ]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt; &lt;p&gt; &lt;b&gt;&lt;span class="for_questions_blue"&gt;What is "Microsoft Intermediate Language" (MSIL)?&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="answers"&gt;A .NET programming language (C#, VB.NET, J# etc.) does  not compile into executable code; instead it compiles  into an intermediate code called Microsoft Intermediate  Language (MSIL). As a programmer one need not worry  about the syntax of MSIL - since our source code in  automatically converted to MSIL. The MSIL code is then  send to the CLR (Common Language Runtime) that converts  the code to machine language, which is, then run on the  host machine. MSIL is similar to Java Byte code. MSIL is  the CPU-independent instruction set into which .NET  Framework programs are compiled. It contains  instructions for loading, storing, initializing, and  calling methods on objects. Combined with metadata and  the common type system, MSIL allows for true cross-  language integration Prior to execution, MSIL is  converted to machine code. It is not interpreted. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;Differences between Datagrid, Datalist and Repeater? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;1. Datagrid has paging while Datalist doesnt.&lt;br /&gt;2. Datalist has a property called repeat. Direction =  vertical/horizontal. (This is of great help in designing  layouts). This is not there in Datagrid.&lt;br /&gt;3. A repeater is used when more intimate control over  html generation is required.&lt;br /&gt;4. When only checkboxes/radiobuttons are repeatedly  served then a checkboxlist or radiobuttonlist are used  as they involve fewer overheads than a Datagrid.&lt;br /&gt;The Repeater repeats a chunk of HTML you write, it has  the least functionality of the three. DataList is the  next step up from a Repeater; accept you have very  little control over the HTML that the control renders.  DataList is the first of the three controls that allow  you Repeat-Columns horizontally or vertically. Finally,  the DataGrid is the motherload. However, instead of  working on a row-by-row basis, you’re working on a  column-by-column basis. DataGrid caters to sorting and  has basic paging for your disposal. Again you have  little contro, over the HTML. NOTE: DataList and  DataGrid both render as HTML tables by default. Out of  the 3 controls, I use the Repeater the most due to its  flexibility w/ HTML. Creating a Pagination scheme isn't  that hard, so I rarely if ever use a DataGrid.&lt;br /&gt;Occasionally I like using a DataList because it allows  me to easily list out my records in rows of three for  instance.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;I am constantly writing the drawing procedures with  System.Drawing.Graphics, but having to use the try and  dispose blocks is too time-consuming with Graphics  objects. Can I automate this? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Yes, the code&lt;br /&gt;&lt;br /&gt;System.Drawing.Graphics canvas = new  System.Drawing.Graphics();&lt;br /&gt;try&lt;br /&gt;&lt;/span&gt;{&lt;span class="answers"&gt;&lt;br /&gt;//some code&lt;br /&gt;&lt;/span&gt;}&lt;span class="answers"&gt;&lt;br /&gt;finally&lt;br /&gt;canvas.Dispose();&lt;br /&gt;&lt;br /&gt;is functionally equivalent to&lt;br /&gt;&lt;br /&gt;using (System.Drawing.Graphics canvas = new  System.Drawing.Graphics())&lt;br /&gt;&lt;/span&gt;{&lt;span class="answers"&gt;&lt;br /&gt;//some code&lt;br /&gt;} //canvas.Dispose() gets called automatically&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;How do you trigger the Paint event in System.Drawing? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Invalidate the current form, the OS will take care of  repainting. The Update method forces the repaint. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;With these events, why wouldn’t Microsoft combine  Invalidate and Paint, so that you wouldn’t have to tell  it to repaint, and then to force it to repaint? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Painting is the slowest thing the OS does, so usually  telling it to repaint, but not forcing it allows for the  process to take place in the background. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;How can you assign an RGB color to a  System.Drawing.Color object? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Call the static method FromArgb of this class and pass  it the RGB values. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b&gt;&lt;span class="for_questions_blue"&gt;What class does Icon derive from? Isn’t it just a Bitmap  with a wrapper name around it?&lt;/span&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;No, Icon lives in System.Drawing namespace. It’s not a  Bitmap by default, and is treated separately by .NET.  However, you can use ToBitmap method to get a valid  Bitmap object from a valid Icon object. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;Before in my VB app I would just load the icons from  DLL. How can I load the icons provided by .NET  dynamically? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;By using System.Drawing.SystemIcons class, for example  System.Drawing.SystemIcons.Warning produces an Icon with  a warning sign in it. &lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;When displaying fonts, what’s the difference between  pixels, points and ems? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;A pixel is the lowest-resolution dot the computer  monitor supports. Its size depends on user’s settings  and monitor size. A point is always 1/72 of an inch. An  em is the number of pixels that it takes to display the  letter M.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is the difference between VB 6 and VB.NET? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Answer1&lt;br /&gt;VB&lt;br /&gt;&lt;br /&gt;1,Object-based Language&lt;br /&gt;2,Doesnot support Threading&lt;br /&gt;3,Not powerful Exception handling mechanism&lt;br /&gt;4,Doesnot having support for the console based  applications&lt;br /&gt;5,Cannot use more than one version of com objects in vb  application called DLL error&lt;br /&gt;6,Doesnot support for the Disconnected data source.&lt;br /&gt;&lt;br /&gt;VB.Net&lt;br /&gt;&lt;br /&gt;1,Object-oriented Language&lt;br /&gt;2,supports Threading&lt;br /&gt;3,powerful Exception handling mechanism&lt;br /&gt;4,having support for the console based applications&lt;br /&gt;5,More than one version of dll is supported&lt;br /&gt;6,supports the Disconnected data source by using Dataset  class&lt;br /&gt;&lt;br /&gt;Answer2&lt;br /&gt;VB:&lt;br /&gt;1. Object-based language&lt;br /&gt;2. Does not support inheritance&lt;br /&gt;3. ADO.Net does not give support for disconnected data  architecture&lt;br /&gt;4. No interoperability function&lt;br /&gt;5. No support for threading&lt;br /&gt;&lt;br /&gt;VB.Net&lt;br /&gt;1. Object-Oriented Programming lanugage&lt;br /&gt;2. ADO.Net gives support for disconnected data  architecture&lt;br /&gt;3. It provides interoperability&lt;br /&gt;4. It uses managed code&lt;br /&gt;5. supports threading&lt;br /&gt;6. provides access to third-party controls like COM,  DCOM&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Answer2&lt;br /&gt;1.The concept of the complete flow of execution of a  program from start to finish: Visual Basic hides this  aspect of programs from you, so that the only elements  of a Visual Basic program you code are the event  handlers and any methods in class modules. C# makes the  complete program available to you as source code. The  reason for this has to do with the fact that C# can be  seen, philosophically, as next-generation C++. The roots  of C++ go back to the 1960s and predate windowed user  interfaces and sophisticated operating systems. C++  evolved as a low-level, closeto- the-machine,  all-purpose language. To write GUI applications with C++  meant that you had to invoke the system calls to create  and interact with the windowed forms. C# has been  designed to build on this tradition while simplifying  and modernizing C++, to combine the low-level  performance benefits of C++ with the ease of coding in  Visual Basic. Visual Basic, on the other hand, is  designed specifically for rapid application development  of Windows GUI applications. For this reason, in Visual  Basic all the GUI boilerplate code is hidden, and all  the Visual Basic programmer implements are the event  handlers. In C# on the other hand, this boilerplate code  is exposed as part of your source code.&lt;br /&gt;2. Classes and inheritance: C# is a genuine  object-oriented language, unlike Visual Basic, requiring  all code to be a part of a class. It also includes  extensive support for implementation inheritance.  Indeed, most well-designed C# programs will be very much  designed around this form of inheritance, which is  completely absent in Visual Basic.&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7468658770095272063-3466182763311869873?l=dotnet786.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnet786.blogspot.com/feeds/3466182763311869873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7468658770095272063&amp;postID=3466182763311869873' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/3466182763311869873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/3466182763311869873'/><link rel='alternate' type='text/html' href='http://dotnet786.blogspot.com/2007/05/dotnet-faqs-7_30.html' title='dotnet faqs 7'/><author><name>prashanth</name><uri>http://www.blogger.com/profile/07711599595106933499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7468658770095272063.post-5777622636374308302</id><published>2007-05-30T09:28:00.000-07:00</published><updated>2007-05-30T09:29:04.199-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dotnet faqs 7'/><title type='text'>dotnet faqs 7</title><content type='html'>&lt;h2&gt;&lt;span class="heading_2"&gt;.NET Interview Questions And Answers&lt;/span&gt;&lt;span style="font-weight: 400;"&gt;&lt;span style="font-family:Arial;font-size:100%;"&gt;  &lt;span class="small_headings"&gt;[.NET Frequently Asked Questions ,.NET FAQ ]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt; &lt;p&gt; &lt;b&gt;&lt;span class="for_questions_blue"&gt;What is "Microsoft Intermediate Language" (MSIL)?&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="answers"&gt;A .NET programming language (C#, VB.NET, J# etc.) does  not compile into executable code; instead it compiles  into an intermediate code called Microsoft Intermediate  Language (MSIL). As a programmer one need not worry  about the syntax of MSIL - since our source code in  automatically converted to MSIL. The MSIL code is then  send to the CLR (Common Language Runtime) that converts  the code to machine language, which is, then run on the  host machine. MSIL is similar to Java Byte code. MSIL is  the CPU-independent instruction set into which .NET  Framework programs are compiled. It contains  instructions for loading, storing, initializing, and  calling methods on objects. Combined with metadata and  the common type system, MSIL allows for true cross-  language integration Prior to execution, MSIL is  converted to machine code. It is not interpreted. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;Differences between Datagrid, Datalist and Repeater? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;1. Datagrid has paging while Datalist doesnt.&lt;br /&gt;2. Datalist has a property called repeat. Direction =  vertical/horizontal. (This is of great help in designing  layouts). This is not there in Datagrid.&lt;br /&gt;3. A repeater is used when more intimate control over  html generation is required.&lt;br /&gt;4. When only checkboxes/radiobuttons are repeatedly  served then a checkboxlist or radiobuttonlist are used  as they involve fewer overheads than a Datagrid.&lt;br /&gt;The Repeater repeats a chunk of HTML you write, it has  the least functionality of the three. DataList is the  next step up from a Repeater; accept you have very  little control over the HTML that the control renders.  DataList is the first of the three controls that allow  you Repeat-Columns horizontally or vertically. Finally,  the DataGrid is the motherload. However, instead of  working on a row-by-row basis, you’re working on a  column-by-column basis. DataGrid caters to sorting and  has basic paging for your disposal. Again you have  little contro, over the HTML. NOTE: DataList and  DataGrid both render as HTML tables by default. Out of  the 3 controls, I use the Repeater the most due to its  flexibility w/ HTML. Creating a Pagination scheme isn't  that hard, so I rarely if ever use a DataGrid.&lt;br /&gt;Occasionally I like using a DataList because it allows  me to easily list out my records in rows of three for  instance.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;I am constantly writing the drawing procedures with  System.Drawing.Graphics, but having to use the try and  dispose blocks is too time-consuming with Graphics  objects. Can I automate this? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Yes, the code&lt;br /&gt;&lt;br /&gt;System.Drawing.Graphics canvas = new  System.Drawing.Graphics();&lt;br /&gt;try&lt;br /&gt;&lt;/span&gt;{&lt;span class="answers"&gt;&lt;br /&gt;//some code&lt;br /&gt;&lt;/span&gt;}&lt;span class="answers"&gt;&lt;br /&gt;finally&lt;br /&gt;canvas.Dispose();&lt;br /&gt;&lt;br /&gt;is functionally equivalent to&lt;br /&gt;&lt;br /&gt;using (System.Drawing.Graphics canvas = new  System.Drawing.Graphics())&lt;br /&gt;&lt;/span&gt;{&lt;span class="answers"&gt;&lt;br /&gt;//some code&lt;br /&gt;} //canvas.Dispose() gets called automatically&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;How do you trigger the Paint event in System.Drawing? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Invalidate the current form, the OS will take care of  repainting. The Update method forces the repaint. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;With these events, why wouldn’t Microsoft combine  Invalidate and Paint, so that you wouldn’t have to tell  it to repaint, and then to force it to repaint? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Painting is the slowest thing the OS does, so usually  telling it to repaint, but not forcing it allows for the  process to take place in the background. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;How can you assign an RGB color to a  System.Drawing.Color object? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Call the static method FromArgb of this class and pass  it the RGB values. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b&gt;&lt;span class="for_questions_blue"&gt;What class does Icon derive from? Isn’t it just a Bitmap  with a wrapper name around it?&lt;/span&gt; &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;No, Icon lives in System.Drawing namespace. It’s not a  Bitmap by default, and is treated separately by .NET.  However, you can use ToBitmap method to get a valid  Bitmap object from a valid Icon object. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;Before in my VB app I would just load the icons from  DLL. How can I load the icons provided by .NET  dynamically? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;By using System.Drawing.SystemIcons class, for example  System.Drawing.SystemIcons.Warning produces an Icon with  a warning sign in it. &lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;When displaying fonts, what’s the difference between  pixels, points and ems? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;A pixel is the lowest-resolution dot the computer  monitor supports. Its size depends on user’s settings  and monitor size. A point is always 1/72 of an inch. An  em is the number of pixels that it takes to display the  letter M.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is the difference between VB 6 and VB.NET? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Answer1&lt;br /&gt;VB&lt;br /&gt;&lt;br /&gt;1,Object-based Language&lt;br /&gt;2,Doesnot support Threading&lt;br /&gt;3,Not powerful Exception handling mechanism&lt;br /&gt;4,Doesnot having support for the console based  applications&lt;br /&gt;5,Cannot use more than one version of com objects in vb  application called DLL error&lt;br /&gt;6,Doesnot support for the Disconnected data source.&lt;br /&gt;&lt;br /&gt;VB.Net&lt;br /&gt;&lt;br /&gt;1,Object-oriented Language&lt;br /&gt;2,supports Threading&lt;br /&gt;3,powerful Exception handling mechanism&lt;br /&gt;4,having support for the console based applications&lt;br /&gt;5,More than one version of dll is supported&lt;br /&gt;6,supports the Disconnected data source by using Dataset  class&lt;br /&gt;&lt;br /&gt;Answer2&lt;br /&gt;VB:&lt;br /&gt;1. Object-based language&lt;br /&gt;2. Does not support inheritance&lt;br /&gt;3. ADO.Net does not give support for disconnected data  architecture&lt;br /&gt;4. No interoperability function&lt;br /&gt;5. No support for threading&lt;br /&gt;&lt;br /&gt;VB.Net&lt;br /&gt;1. Object-Oriented Programming lanugage&lt;br /&gt;2. ADO.Net gives support for disconnected data  architecture&lt;br /&gt;3. It provides interoperability&lt;br /&gt;4. It uses managed code&lt;br /&gt;5. supports threading&lt;br /&gt;6. provides access to third-party controls like COM,  DCOM&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Answer2&lt;br /&gt;1.The concept of the complete flow of execution of a  program from start to finish: Visual Basic hides this  aspect of programs from you, so that the only elements  of a Visual Basic program you code are the event  handlers and any methods in class modules. C# makes the  complete program available to you as source code. The  reason for this has to do with the fact that C# can be  seen, philosophically, as next-generation C++. The roots  of C++ go back to the 1960s and predate windowed user  interfaces and sophisticated operating systems. C++  evolved as a low-level, closeto- the-machine,  all-purpose language. To write GUI applications with C++  meant that you had to invoke the system calls to create  and interact with the windowed forms. C# has been  designed to build on this tradition while simplifying  and modernizing C++, to combine the low-level  performance benefits of C++ with the ease of coding in  Visual Basic. Visual Basic, on the other hand, is  designed specifically for rapid application development  of Windows GUI applications. For this reason, in Visual  Basic all the GUI boilerplate code is hidden, and all  the Visual Basic programmer implements are the event  handlers. In C# on the other hand, this boilerplate code  is exposed as part of your source code.&lt;br /&gt;2. Classes and inheritance: C# is a genuine  object-oriented language, unlike Visual Basic, requiring  all code to be a part of a class. It also includes  extensive support for implementation inheritance.  Indeed, most well-designed C# programs will be very much  designed around this form of inheritance, which is  completely absent in Visual Basic.&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7468658770095272063-5777622636374308302?l=dotnet786.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnet786.blogspot.com/feeds/5777622636374308302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7468658770095272063&amp;postID=5777622636374308302' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/5777622636374308302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/5777622636374308302'/><link rel='alternate' type='text/html' href='http://dotnet786.blogspot.com/2007/05/dotnet-faqs-7.html' title='dotnet faqs 7'/><author><name>prashanth</name><uri>http://www.blogger.com/profile/07711599595106933499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7468658770095272063.post-4319083337053925791</id><published>2007-05-30T09:26:00.000-07:00</published><updated>2007-05-30T09:28:28.112-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dotnet faqs 8'/><title type='text'>dotnet faqs 8</title><content type='html'>&lt;h2&gt;&lt;span class="heading_2"&gt;.NET Interview Questions And Answers&lt;/span&gt;&lt;span style="font-weight: 400;"&gt;&lt;span style="font-family:Arial;font-size:100%;"&gt;  &lt;span class="small_headings"&gt;[.NET Frequently Asked Questions ,.NET FAQ ]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt; &lt;p&gt;&lt;b&gt;&lt;span class="for_questions_blue"&gt;What are the authentication methods in .NET?&lt;/span&gt;&lt;span class="answers"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="answers"&gt;There are 4 types of authentications.&lt;br /&gt;1.WINDOWS AUTHENTICATION&lt;br /&gt;2.FORMS AUTHENTICATION&lt;br /&gt;3.PASSPORT AUTHENTICATION&lt;br /&gt;4.NONE/CUSTOM AUTHENTICATION&lt;br /&gt;&lt;br /&gt;The authentication option for the ASP.NET application is  specified by using the tag in the Web.config file, as  shown below:&lt;br /&gt;other authentication options&lt;br /&gt;1. WINDOWS AUTHENTICATION Schemes&lt;br /&gt;I. Integrated Windows authentication&lt;br /&gt;II. Basic and basic with SSL authentication&lt;br /&gt;III. Digest authentication&lt;br /&gt;IV. Client Certificate authentication&lt;br /&gt;&lt;br /&gt;2. FORMS AUTHENTICATION&lt;br /&gt;You, as a Web application developer, are supposed to  develop the Web page and authenticate the user by  checking the provided user ID and password against some  user database&lt;br /&gt;&lt;br /&gt;3.PASSPORT AUTHENTICATION&lt;br /&gt;A centralized service provided by Microsoft, offers a  single logon point for clients. Unauthenticated users  are redirected to the Passport site&lt;br /&gt;&lt;br /&gt;4 NONE/CUSTOM AUTHENTICATION:&lt;br /&gt;If we don’t want ASP.NET to perform any authentication,  we can set the authentication mode to “none”. The reason  behind this decision could be: We don’t want to  authenticate our users, and our Web site is open for all  to use. We want to provide our own custom authentication &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is Serialization in .NET? &lt;/b&gt; &lt;span class="answers"&gt;&lt;br /&gt;Anwer1&lt;br /&gt;The serialization is the process of converting the  objects into stream of bytes.&lt;br /&gt;they or used for transport the objects(via remoting) and  persist objects(via files and databases)&lt;br /&gt;&lt;br /&gt;Answer2&lt;br /&gt;When developing smaller applications that do not have a  database (or other formal storage mechanism) or data  that doesn’t need to be stored in a database (such as  the state of a web application), you often still would  like to save the data for later retrieval. There are  many ways to do this, but many of them are subject to a  lot of extra code (work) and extra time spent debugging.  With .NET, there is now an easy way to add this  functionality to your code with only a few lines of  easily tested code. This easy way is called  serialization.&lt;br /&gt;&lt;br /&gt;Serialization is the process of storing an object,  including all of its public and private fields, to a  stream. Deserialization is the opposite – restoring an  object’s field values from a stream. The stream is  generally in the form of a FileStream, but does not have  to be. It could be a memory stream or any other object  that is of type IO.Stream. The format can be anything  from XML to binary to SOAP. &lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What’s the use of System.Diagnostics.Process class? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;By using System.Diagnostics.Process class, we can  provide access to the files which are presented in the  local and remote system.&lt;br /&gt;Example: System.Diagnostics.Process(”c:\mlaks\example.txt”)  — local file&lt;br /&gt;System.Diagnostics.Process(”http://www.mlaks.com\example.txt”)  — remote file&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What are the authentication methods in .NET?&lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Abstract class: This class has abstract methods (no  body). This class cannot be instantiated. One needs to  provide the implementation of the methods by overriding  them in the derived class. No Multiple Inheritance.&lt;br /&gt;Interfaces: Interface class contains all abstract  methods which are public by default. All of these  methods must be implemented in the derived class. One  can inherit from from more than one interface thus  provides for Multiple Inheritance. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;re-clarification of object based:  &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;VB6 DOES support polymorphism and interface inheritance.  It also supports the “Implements” keyword. What is not  supported in vb6 is implementation inheritance.&lt;br /&gt;Also, from above, vb6 DOES “provides access to  third-party controls like COM, DCOM ” That is not  anything new in .NET. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;How to achieve Polymorphism in VB.Net?  &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;We can achieve polymarphism in .Net i.e Compile time  polymarphism and Runtime polymarphism. Compiletime  Polymarphism achieved by method overloading. Runtime  polymarphism achieved by Early Binding or Late Binding.  Provide the function pointer to the object at compile  time called as Early Binding.&lt;br /&gt;provide the function pointer to the object at runtime  called as Late Binding&lt;br /&gt;class emp having the method display()&lt;br /&gt;class dept having the method display()&lt;br /&gt;&lt;br /&gt;create objects as in the main function&lt;br /&gt;// Early binding&lt;br /&gt;dim obj as new emp&lt;br /&gt;dim ob as new dept&lt;br /&gt;&lt;br /&gt;obj.display()-to call the display method of emp class&lt;br /&gt;ob.display-to call the display method of the dept class&lt;br /&gt;// Late binding&lt;br /&gt;&lt;br /&gt;create object in the main class as&lt;br /&gt;object obj&lt;br /&gt;obj=new emp&lt;br /&gt;obj.display()-to call the display of emp class&lt;br /&gt;obj=new dept&lt;br /&gt;obj.display()-to call the display of dept class&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;Difference between Class And Interface  &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;Class is logical representation of object. It is  collection of data and related sub procedures with  defination.&lt;br /&gt;Interface is also a class containg methods which is not  having any definations.&lt;br /&gt;Class does not support multiple inheritance. But  interface can support.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What doesu mean by .NET framework? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;The .NET Framework is an environment for building,  deploying, and running Web Services and other  applications. It consists of three main parts: the  Common Language Runtime, the Framework classes, and  ASP.NET &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is assembly? &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;It is a single deployable unit that contains all the  information abt the implimentation of classes ,  stuctures and interfaces &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="for_questions_blue"&gt;What is namespaces?  &lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;It is a logical group of related classes and interfaces  and that can be used byany language targeting the .net  framework.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="style15"&gt;&lt;u&gt;.NET framework programming interview questions &lt;/u&gt; &lt;/span&gt;&lt;br /&gt;&lt;b class="for_questions_blue"&gt;&lt;br /&gt;.NET framework overview&lt;/b&gt;&lt;span class="answers"&gt;&lt;br /&gt;1. Has own class libraries. System is the main namespace  and all other namespaces are subsets of this.&lt;br /&gt;2. It has CLR(Common language runtime, Common type  system, common language specification)&lt;br /&gt;3. All the types are part of CTS and Object is the base  class for all the types.&lt;br /&gt;4. If a language said to be .net complaint, it should be  compatible with CTS and CLS.&lt;br /&gt;5. All the code compiled into an intermediate language  by the .Net language compiler, which is nothing but an  assembly.&lt;br /&gt;6. During runtime, JIT of CLR picks the IL code and  converts into PE machine code and from there it  processes the request.&lt;br /&gt;7. CTS, CLS, CLR&lt;br /&gt;8. Garbage Collection&lt;br /&gt;9. Dispose, finalize, suppress finalize, Idispose  interface&lt;br /&gt;10. Assemblies, Namespace: Assembly is a collection of  class/namespaces. An assembly contains Manifest,  Metadata, Resource files, IL code&lt;br /&gt;11. Com interoperability, adding references, web  references&lt;br /&gt;12. Database connectivity and providers&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Application Domain&lt;br /&gt;1. Class modifiers: public, private, friend, protected,  protected friend, mustinherit, NotInheritable&lt;br /&gt;2. Method modifiers: public, private&lt;br /&gt;3. Overridable&lt;br /&gt;4. Shadows&lt;br /&gt;5. Overloadable&lt;br /&gt;6. Overrides&lt;br /&gt;7. Overloads&lt;br /&gt;8. Set/Get Property&lt;br /&gt;9. IIF&lt;br /&gt;10. Inheritance&lt;br /&gt;11. Polymorphism&lt;br /&gt;12. Delegates&lt;br /&gt;13. Events&lt;br /&gt;14. Reflection&lt;br /&gt;15. Boxing&lt;br /&gt;16. UnBoxing&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ASP.Net&lt;br /&gt;1. Web Controls: Data grid (templates, sorting, paging,  bound columns, unbound columns, data binding), Data  list, repeater controls&lt;br /&gt;2. HTML Controls&lt;br /&gt;3. Code behind pages, system.web.ui.page base class&lt;br /&gt;4. Web.config: App settings, identity (impersonate),  authentication (windows, forms, anonymous, passport),  authorization&lt;br /&gt;5. Databind.eval&lt;br /&gt;6. Trace, Debug&lt;br /&gt;7. Output cache&lt;br /&gt;8. Session management&lt;br /&gt;9. Application, Session&lt;br /&gt;10. Global.asax httpapplication&lt;br /&gt;11. User controls, custom controls, custom rendered  controls (postback event, postdatachanged event)  usercontrol is the base class&lt;br /&gt;12. Directives&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ADO.Net&lt;br /&gt;1. Command object (ExecuteNonquery, ExecuteReader,  ExecuteXMLReader, ExecuteScalar)&lt;br /&gt;2. DataAdapter object (Fill)&lt;br /&gt;3. Dataset (collection of tables)&lt;br /&gt;4. CommandBuiler object&lt;br /&gt;5. Transaction Object&lt;br /&gt;6. Isolation levels&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7468658770095272063-4319083337053925791?l=dotnet786.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnet786.blogspot.com/feeds/4319083337053925791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7468658770095272063&amp;postID=4319083337053925791' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/4319083337053925791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7468658770095272063/posts/default/4319083337053925791'/><link rel='alternate' type='text/html' href='http://dotnet786.blogspot.com/2007/05/dotnet-faqs-8.html' title='dotnet faqs 8'/><author><name>prashanth</name><uri>http://www.blogger.com/profile/07711599595106933499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
