Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
Dot Net Question

Dot Net Question

Ratings:

5.0

(1)
|Views: 171|Likes:
Published by dinesh_geit3650

More info:

Published by: dinesh_geit3650 on Jan 31, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC or read online from Scribd
See more
See less

03/26/2011

 
NET FRAME WORK INTERVIEW QUESTIONS
http://www.ittestpapers.com/categories/Technical-Interview-Questions/.NET/
01. When was .NET announced?Ans : Bill Gates delivered a keynote at Forum 2000, held June 22, 2000, outliningthe .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 .NETframework/SDK and Visual Studio.NET. 02. When was the first version of .NET released?Ans : The final version of the 1.0 SDK and runtime was made publicly availablearound 6pm PST on 15-Jan-2002. At the same time, the final version of VisualStudio.NET was made available to MSDN subscribers. 03. What platforms does the .NET Framework run on?Ans : The runtime supports Windows XP, Windows 2000, NT4 SP6a and WindowsME/98. Windows 95 is not supported. Some parts of the framework do not work onall platforms - for example, ASP.NET is only supported on Windows XP andWindows 2000. Windows 98/ME cannot be used for development. IIS is notsupported on Windows XP Home Edition, and so cannot be used to host ASP.NET.However, the ASP.NET Web Matrix web server does run on XP Home. The Monoproject is attempting to implement the .NET framework on Linux. 04. What is the CLR?Ans : CLR = Common Language Runtime. The CLR is a set of standard resourcesthat (in theory) any .NET program can take advantage of, regardless of programming language. Robert Schmidt (Microsoft) lists the following CLRresources in his MSDN PDC# article:Object-oriented programming model(inheritance, polymorphism, exception handling, garbage collection)
Security model Type system All .NET base classesMany .NET framework classes Development, debugging, and profilingtools Execution and code management IL-to-native translators and optimizers
What this means is that in the .NET world, different programming languages willbe more equal in capability than they have ever been before, although clearly notall languages will support all CLR services.
 
 05. What is the CTS?Ans : CTS = Common Type System. This is the range of types that the .NETruntime understands, and therefore that .NET applications can use. However notethat not all .NET languages will support all the types in the CTS. The CTS is asuperset of the CLS. 06. What is the CLS?Ans : CLS = Common Language Specification. This is a subset of the CTS which all.NET languages are expected to support. The idea is that any program which usesCLS-compliant types can interoperate with any .NET program written in anylanguage.In theory this allows very tight interop between different .NET languages - forexample allowing a C# class to inherit from a VB class. 07. What is IL?Ans : IL = Intermediate Language. Also known as MSIL (Microsoft IntermediateLanguage) or CIL (Common Intermediate Language). All .NET source code (of anylanguage) is compiled to IL. The IL is then converted to machine code at the pointwhere the software is installed, or at run-time by a Just-In-Time (JIT) compiler. 08. What does 'managed' mean in the .NET context?Ans : The term 'managed' is the cause of much confusion. It is used in variousplaces within .NET, meaning slightly different things.Managed code: The .NETframework provides several core run-time services to the programs that run withinit - for exampleexception handling and security. For these services to work, the code must providea minimum level of information to the runtime.Such code is called managed code. All C# and Visual Basic.NET code is managedby default. VS7 C++ code is not managed by default, but the compiler canproduce managed code by specifying a command-line switch (/com+).
Managed data
: This is data that is allocated and de-allocated by the .NET runtime'sgarbage collector. C# and VB.NET data is always managed. VS7 C++ data isunmanaged by default, even when using the /com+ switch, but it can be markedas managed using the __gc keyword.Managed classes: This is usually referred to
 
in the context of Managed Extensions (ME) for C++. When using ME C++, a classcan be marked with the __gc keyword. As the name suggests, this means that thememory for instances of the class is managed by the garbage collector, but it alsomeans more than that. The class becomes a fully paid-up member of the .NETcommunity with the benefits and restrictions that brings. An example of a benefitis proper interop with classes written in other languages - for example, a managedC++ class can inherit from a VB class. An example of a restriction is that amanaged class can only inherit from one base class. 09. What is reflection?Ans : All .NET compilers produce metadata about the types defined in the modulesthey produce. This metadata is packaged along with the module (modules in turnare packaged together in assemblies), and can be accessed by a mechanism calledreflection. The System.Reflection namespace contains classes that can be used tointerrogate the types for a module/assembly.Using reflection to access .NET metadata is very similar to usingITypeLib/ITypeInfo to access type library data in COM, and it is used for similarpurposes - e.g. determining data type sizes for marshaling data acrosscontext/process/machine boundaries.Reflection can also be used to dynamically invoke methods (seeSystem.Type.InvokeMember ) , or even create types dynamically at run-time (seeSystem.Reflection.Emit.TypeBuilder).10. What is the difference between Finalize and Dispose (Garbage collection) ?Ans : Class instances often encapsulate control over resources that are notmanaged by the runtime, such as window handles (HWND), database connections,and so on. Therefore, you should provide both an explicit and an implicit way tofree those resources. Provide implicit control by implementing the protectedFinalize Method on an object (destructor syntax in C# and the Managed Extensionsfor C++). The garbage collector calls this method at some point after there are nolonger any valid references to the object. In some cases, you might want toprovide programmers using an object with the ability to explicitly release theseexternal resources before the garbage collector frees the object. If an externalresource is scarce or expensive, better performance can be achieved if theprogrammer explicitly releases resources when they are no longer being used. To

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->