Interview questions for .Net Framework 4.0

See : Interview questions for .Net Framework 4.0 - Part II

Q. What are the Major Improvements in .Net Framework 4.0?
Ans.
Introduced in .Net Framework 4.0

Q. How would you Deploy your old applications with .Net Framework 4.0? Are the Old applications compatible?

Ans.
.NET Framework 4 is highly compatible with applications that are built with earlier .NET Framework versions. Though Some Changes have been made to improve security, standards compliance, correctness, reliability, and performance.

To run older applications with .NET Framework 4, you will have to re-compile your applications with the target .NET Framework version specified in the properties for your project in Visual Studio Or you can specify the supported runtime with the Element in an application configuration file. .Net Framework 4 does not automatically use its version of the common language runtime to run applications that are built with earlier versions of the .NET Framework.


Q. Whts is Parallel Computing?

Ans.
To take advantage of multiple cores (that is, CPUs or processors) you can parallelize your code so that it will be distributed across multiple processors. In the past, parallelization required low-level manipulation of threads and locks, but Visual Studio 2010 and the .NET Framework 4 enhances the support for parallel programming by providing a new runtime, new class library types, and new diagnostic tools. These features simplify parallel development so that you can write efficient, fine-grained, and scalable parallel code in a natural idiom without having to work directly with threads or the thread pool.

The new System.Threading.Tasks namespace and other related types support this new model.


Q. What is BigInteger and When would you use that?

Ans.
BigInteger, which is a part of System.Numerics Namespace is a great enhancement over Byte and Int32 datatypes. It is a nonprimitive integral type that supports arbitrarily large signed integers. Unlike Byte and Int32 types, BigInteger does not include a Minvalue and MaxValue property, so can be used to store large integer values.


Q. What other than BigInteger has been introduced in System.Numerics Namespace?

Ans.
Complex types,which represents a complex number has been Introduced. a complex number is a number in the form a + bi, where a is the real part, and b is the imaginary part.


Q. How do you assign a Value to a Complex Number.

Ans.
You can assign a value to a complex number in few different ways.
1. By passing two Double values to its constructor. The first value represents the real part of the complex number, and the second value represents its imaginary part.
2. By assigning a Byte, SByte, Int16, UInt16, Int32, UInt32, Int64, UInt64, Single, or Double value to a Complex object. The value becomes the real part of the complex number, and its imaginary part equals 0.

E.g Complex c1 = new Complex(12, 6);
Console.WriteLine(c1);
OutPut - (12, 6)


Q. How has exception hand changed in .Net Framework 4.0

Ans.
A New Namespace System.Runtime.ExceptionServices has been introduced which provides classes for advanced exception handling. It has introduced the following classes
1. HandleProcessCorruptedStateExceptionsAttribute Class - Enables managed code to handle exceptions that indicate a corrupted process state.So,If you want to compile an application in the .NET Framework 4 and handle corrupted state exceptions, you can apply this attribute to the method that handles the corrupted state exception.
2.FirstChanceExceptionEventArgs Class -Provides data for the notification event that is raised when a managed exception first occurs, before the common language runtime begins searching for event handlers.

See : Interview questions for .Net Framework 4.0 - Part II

1 comments:

  1. Hi

    Tks very much for post:

    I like it and hope that you continue posting.

    Let me show other source that may be good for community.

    Source: Free interview questions

    Best rgs
    David

    ReplyDelete

Disclaimer

This is a personal weblog. The opinions expressed here represent my own and not those of my employer or anyone else. Should you have any questions or concerns please e-mail me at sharepointprogrammingblogger@gmail.com .

Copyright (c) 2010 @ myshaepointwork.blogspot.com. All rights are reserved.Do Not Copy.

@ Learning SharePoint.com