Showing posts with label ebook free download for asp.net. Show all posts
Showing posts with label ebook free download for asp.net. Show all posts

Interviews Phases

Each round of interview is usually split into three phases, as shown in Figure 1-2. The first phase is the behavioral interview, in which interviewers examine candidates' experience while referring to their résumés. The second phase is the technical interview when it is highly possible for a candidate to be asked to solve some coding interview problems. Finally, the candidate is given time to ask a few questions. 
Behavior Interview
The first five to ten minutes of a round of interview is used for becoming acquainted. Usually, this is time for the behavioral interview, and no difficult technical questions are asked. Interviewers look for someone who would be a good fit for the job in terms of technical skills as well as personality. A person who is too timid might not fit well into an environment where he or she needs to be vocal. Interviewers also look for enthusiasm and excitement. If candidates are not excited about the position, they may not be motivated to contribute, even if they are a strong technical fit.
Most interviews begin with candidates' introducing themselves. A candidate usually doesn’t need to spend a lot of time introducing his or her main study and work experiences because interviewers have seen his or her résumé which contains detailed information. However, if an interviewer feels interested in a project the candidate has worked on, he or she may ask several questions on that subject in the introductory phase.

Project Experience
After a candidate has introduced him- or herself, interviewers may follow up with some questions on interesting projects listed on his or her résumé. It is recommended to use the STAR pattern to describe each project both on your résumé and during interviews (Figure 1-3).
  • Situation: Concise information about the project background, including the size, features, and target customers of the project.
  • Task: Concrete tasks should be listed when describing a big project. Please notice the difference between “taking part in a project” and “taking charge of a project.” When candidates mentioned they have taken charge of a project, it is highly possible for them to be asked about the overall architectural design, core algorithms, and team collaboration. These questions would be very difficult to answer if the candidates only joined a team and wrote dozens of lines of code. Candidates should be honest during interviews. Reference checks will also query claims made on résumés.
  • Action: Detailed information should be covered about how to finish tasks. If the task was architectural design, what were the requirements and how were they fulfilled? If the task was to implement a feature, what technologies were applied on which platforms? If it was to test, was it tested automatically or manually, with black boxes or white boxes?
  • Result: Data, especially numbers, about your contribution should be listed explicitly. If the task is to implement features, how many features have been delivered in time? If the task is to maintain an existing system, how many bugs have been fixed?
Let’s look at an example of the STAR patter in use. I usually describe my experience working on the Microsoft Winforms team in the following terms:
Winforms is a mature UI platform in Microsoft .NET (Situation). I mainly focused on maintenance and on implementing a few new features (Task). For the new features, I implemented new UI styles on Winforms controls in C# in order to make them look consistent between Windows XP and Windows 7. I tried to debug most of the reproducible issues we had with Visual Studio and employed WinDbg to analyze dump files (Action). I fixed more than 200 bugs in those two years (Result).
Interviewers may follow up with a few questions if the information you supplied in these four categories has not been described clearly. Additionally, interviewers are also interested in the candidates’ answers to the following questions:
  • What was the most difficult issue in the project? How did you solve it?
  • What did you learn from the project?
  • When did you conflict with other team members (developers, testers, UI designers, or project managers)? How did you eliminate these conflicts?
    It is strongly recommended that candidates prepare answers to each of the questions above when they write their résumés. The more time they spend preparing, the more confident they will be during interviews.
When describing a project either on a résumé or during an interview, candidates should be concise regarding project background, but they should provide detailed information about their own tasks, actions, and contributions. 
  1. Technical Skills
    Besides project experiences, technical skills are also a key element that interviewers pay close attention to on candidates’ résumés. Candidates should be honest in describing the proficiency level of their skills. Only when candidates feel confident that they are capable of solving most of the problems in a certain domain, should they declare themselves experts. Interviewers have higher expectation of candidates who claim to be experts and ask them more difficult questions. It is very disappointing when you cannot meet these expectations. 
    Candidates should be honest when they are describing their project experiences and technical skills. 
  2. www.cinterviews.com appreciates your contribution please mail us the questions you have to cinterviews.blogspot.com@gmail.com so that it will be useful to our job search community

ASP.Net by example ebook free download

ASP.Net by example ebook free download

Description: ASP developers need to understand how ASP.NET can help them solve business problems better than any prior product. ASP.NET by Example is designed to provide a "crash course" on ASP.NET and quickly help the reader start using this new technology. As part of the By Example series, this book approaches ASP.NET in an easy-to-use tutorial way, giving the reader a much faster and more interactive learning experience than the traditional reference book. By building the sample applications taught in the book, readers will learn how to create customASP.NET controls, how to use ADO+ objects in ASP, and how to deploy and manage applications. ASP.NET by Example also provides tools and information needed to migrate old ASP files to the new platform, saving developers significant time and money. As an added feature Steven A. Smith has included multiple case studies on howASP.NET is used in e-commerce applications.

C# interview questions on Destructors

C# interview questions on Destructors

What is a Destructor?
A Destructor has the same name as the class with a tilde character and is used to destroy an instance of a class.

Can a class have more than 1 destructor?

No, a class can have only 1 destructor.

Can structs in C# have destructors?
No, structs can have constructors but not destructors, only classes can have destructors.

Can you pass parameters to destructors?
No, you cannot pass parameters to destructors. Hence, you cannot overload destructors.

Can you explicitly call a destructor?

No, you cannot explicitly call a destructor. Destructors are invoked automatically by the garbage collector.

Why is it not a good idea to use Empty destructors?
When a class contains a destructor, an entry is created in the Finalize queue. When the destructor is called, the garbage collector is invoked to process the queue. If the destructor is empty, this just causes a needless loss of performance.

Is it possible to force garbage collector to run?
Yes, it possible to force garbage collector to run by calling the Collect() method, but this is not considered a good practice because this might create a performance over head. Usually the programmer has no control over when the garbage collector runs. The garbage collector checks for objects that are no longer being used by the application. If it considers an object eligible for destruction, it calls the destructor(if there is one) and reclaims the memory used to store the object.

Usually in .NET, the CLR takes care of memory management. Is there any need for a programmer to explicitly release memory and resources? If yes, why and how?
If the application is using expensive external resource, it is recommend to explicitly release the resource before the garbage collector runs and frees the object. We can do this by implementing the Dispose method from the IDisposable interface that performs the necessary cleanup for the object. This can considerably improve the performance of the application.

When do we generally use destructors to release resources?
If the application uses unmanaged resources such as windows, files, and network connections, we use destructors to release resources.

Keywords:
destructor in c# tutorialspoint
constructor and destructor in c#
c# destructor vs dispose
c# destructor not called
destructor in c# in hindi
difference between constructor and destructor in c++
c# destructor vs finalize
virtual destructor in c# net
c# destructor not called
c# finalizer vs destructor
c# static destructor
c# struct constructor
c# form destructor
c# force destructor call
c++ struct destructor
finalize c#
c# destructor not called
c# destructor vs dispose
c# destructor vs finalize
constructor and destructor in c#
destructor in c# tutorialspoint
c# struct destructor
c# static destructor
c# when is destructor called

ASP.NET Interview questions and answers for interfaces

ASP.NET Interview questions and answers for  interfaces

Explain what is an Interface in C#?
An Interface in C# is created using the interface keyword. An example is shown below.
using System;
namespace Interfaces
{
   interface IBankCustomer
   {
      void DepositMoney();
      void WithdrawMoney();
   }
   public class Demo : IBankCustomer
   {
      public void DepositMoney()
      {
         Console.WriteLine("Deposit Money");
      }

      public void WithdrawMoney()
      {
         Console.WriteLine("Withdraw Money");
      }

      public static void Main()
      {
         Demo DemoObject = new Demo();
         DemoObject.DepositMoney();
         DemoObject.WithdrawMoney();
      }
   }
}
In our example we created IBank Customer interface. The interface declares 2 methods.
1. void DepositMoney();
2. void WithdrawMoney();

Notice that method declarations does not have access modifiers like public, private, etc. By default all interface members are public. It is a compile time error to use access modifiers on interface member declarations. Also notice that the interface methods have only declarations and not implementation. It is a compile time error to provide implementation for any interface member. In our example as the Demo class is inherited from the IBankCustomer interface, the Demo class has to provide the implementation for both the methods (WithdrawMoney() and DepositMoney()) that is inherited from the interface. If the class fails to provide implementation for any of the inherited interface member, a compile time error will be generated. Interfaces can consist of methods, properties, events, indexers, or any combination of those four member types. When a class or a struct inherits an interface, the class or struct must provide implementation for all of the members declared in the interface. The interface itself provides no functionality that a class or struct can inherit in the way that base class functionality can be inherited. However, if a base class implements an interface, the derived class inherits that implementation.

Can an Interface contain fields?
No, an Interface cannot contain fields.

What is the difference between class inheritance and interface inheritance?
Classes and structs can inherit from interfaces just like how classes can inherit a base class or struct. However there are 2 differences.
1. A class or a struct can inherit from more than one interface at the same time where as A class or a struct cannot inherit from more than one class at the same time. An example depicting the same is shown below.
using System;
namespace Interfaces
{
   interface Interface1
   {
      void Interface1Method();
   }
   interface Interface2
   {
      void Interface2Method();
   }
   class BaseClass1
   {
      public void BaseClass1Method()
      {
         Console.WriteLine("BaseClass1 Method");
      }
   }
   class BaseClass2
   {
      public void BaseClass2Method()
      {
         Console.WriteLine("BaseClass2 Method");
      }
   }

   //Error : A class cannot inherit from more than one class at the same time
   //class DerivedClass : BaseClass1, BaseClass2
   //{
   //}

   //A class can inherit from more than one interface at the same time
   public class Demo : Interface1, Interface2
   {
      public void Interface1Method()
      {
         Console.WriteLine("Interface1 Method");
      }

      public void Interface2Method()
      {
         Console.WriteLine("Interface2 Method");
      }

      public static void Main()
      {
         Demo DemoObject = new Demo();
         DemoObject.Interface1Method();
         DemoObject.Interface2Method();
      }
   }
}
2. When a class or struct inherits an interface, it inherits only the method names and signatures, because the interface itself contains no implementations.

Can an interface inherit from another interface?
Yes, an interface can inherit from another interface. It is possible for a class to inherit an interface multiple times, through base classes or interfaces it inherits. In this case, the class can only implement the interface one time, if it is declared as part of the new class. If the inherited interface is not declared as part of the new class, its implementation is provided by the base class that declared it. It is possible for a base class to implement interface members using virtual members; in that case, the class inheriting the interface can change the interface behavior by overriding the virtual members.

Can you create an instance of an interface?
No, you cannot create an instance of an interface.

If a class inherits an interface, what are the 2 options available for that class?
Option 1: Provide Implementation for all the members inheirted from the interface.
namespace Interfaces
{
   interface Interface1
   {
      void Interface1Method();
   }

   class BaseClass1 : Interface1
   {
      public void Interface1Method()
      {
         Console.WriteLine("Interface1 Method");
      }
      public void BaseClass1Method()
      {
         Console.WriteLine("BaseClass1 Method");
      }
   }
}
Option 2: If the class does not wish to provide Implementation for all the members inheirted from the interface, then the class has to be marked as abstract.
namespace Interfaces
{
   interface Interface1
   {
      void Interface1Method();
   }

   abstract class BaseClass1 : Interface1
   {
      abstract public void Interface1Method();
      public void BaseClass1Method()
      {
         Console.WriteLine("BaseClass1 Method");
      }
   }
}
A class inherits from 2 interfaces and both the interfaces have the same method name as shown below. How should the class implement the drive method for both Car and Bus interface?
namespace Interfaces
{
   interface Car
   {
      void Drive();
   }
   interface Bus
   {
      void Drive();
   }

   class Demo : Car,Bus
   {
      //How to implement the Drive() Method inherited from Bus and Car
   }
}
To implement the Drive() method use the fully qualified name as shown in the example below. To call the respective interface drive method type cast the demo object to the respective interface and then call the drive method.
using System;
namespace Interfaces
{
   interface Car
   {
      void Drive();
   }
   interface Bus
   {
      void Drive();
   }

   class Demo : Car,Bus
   {
      void Car.Drive()
      {
         Console.WriteLine("Drive Car");
      }
      void Bus.Drive()
      {
         Console.WriteLine("Drive Bus");
      }

      static void Main()
      {
         Demo DemoObject = new Demo();
         ((Car)DemoObject).Drive();
         ((Bus)DemoObject).Drive();
      }
   }
}

What do you mean by "Explicitly Implementing an Interface". Give an example?
If a class is implementing the inherited interface member by prefixing the name of the interface, then the class is "Explicitly Implemeting an Interface member". The disadvantage of Explicitly Implemeting an Interface member is that, the class object has to be type casted to the interface type to invoke the interface member. An example is shown below.
using System;
namespace Interfaces
{
   interface Car
   {
      void Drive();
   }

   class Demo : Car
   {
      // Explicit implementation of an interface member
      void Car.Drive()
      {
         Console.WriteLine("Drive Car");
      }

      static void Main()
      {
         Demo DemoObject = new Demo();

         //DemoObject.Drive();
         // Error: Cannot call explicitly implemented interface method
         // using the class object.
         // Type cast the demo object to interface type Car
         ((Car)DemoObject).Drive();
      }
   }
}

Keywords:
interface in c# with example code project
types of interface in c#
interface in c# with real time example
multiple interface in c#
interface in c# interview questions
interface in c# tutorialspoint
difference between abstract class and interface in c#
c# interface property
interface inheritance c#
difference between abstract class and interface in c#
types of interface in c#
c# instantiate interface
interface inheritance vs implementation inheritance
interface with implementation c#
c# struct interface
single inheritance in c#
c# interface tutorial
types of interface in c#
c# interface inheritance override
c# interface constructor
c# interface property
interface in c# with example code project
multiple interface in c#
c# multiple inheritance
can we create instance of interface in c#
can we create instance of interface in java
can we create object of interface in java 8
interface instance c#
many classes can implement the same interface
can we create object for interface
can we create instance of abstract class
a class can implement multiple interfaces
c# interface
tricky question on interface in c#
use of interface in c#
interface in asp net
types of interface in c#
interview questions on inheritance in c# for experienced
user interface in c#
abstract class in c#

ASP.NET Interview questions and answers for http module

ASP.NET Interview questions and answers for http module

What is an HTTP Handler?
An ASP.NET HTTP handler is the process (frequently referred to as the "endpoint") that runs in response to a request made to an ASP.NET Web application. The most common handler is an ASP.NET page handler that processes .aspx files. When users request an .aspx file, the request is processed by the page through the page handler. You can create your own HTTP handlers that render custom output to the browser.
What is HTTP module?
An HTTP module is an assembly that is called on every request that is made to your application. HTTP modules are called as part of the ASP.NET request pipeline and have access to life-cycle events throughout the request. HTTP modules let you examine incoming and outgoing requests and take action based on the request.
What is the interface that you have to implement if you have to create a Custom HTTP Handler?
Implement IHttpHandler interface to create a synchronous handler.
Implement IHttpAsyncHandler to create an asynchronous handler.

What is the difference between asynchronous and synchronous HTTP Handlers?

A synchronous handler does not return until it finishes processing the HTTP request for which it is called.
An asynchronous handler runs a process independently of sending a response to the user. Asynchronous handlers are useful when you must start an application process that might be lengthy and the user does not have to wait until it finishes before receiving a response from the server.

Which class is responsible for receiving and forwarding a request to the appropriate HTTP handler?

IHttpHandlerFactory Class

Can you create your own custom HTTP handler factory class?
Yes, we can create a custom HTTP handler factory class by creating a class that implements the IHttpHandlerFactory interface.
What is the use of HTTP modules?
HTTP modules are used to implement various application features, such as forms authentication, caching, session state, and client script services.

What is the difference between HTTP modules and HTTP handlers?

An HTTP handler returns a response to a request that is identified by a file name extension or family of file name extensions. In contrast, an HTTP module is invoked for all requests and responses. It subscribes to event notifications in the request pipeline and lets you run code in registered event handlers. The tasks that a module is used for are general to an application and to all requests for resources in the application.
What is the common way to register an HTTP module?
The common way to register an HTTP module is to have an entry in the application's Web.config file.

Much of the functionality of a module can be implemented in a global.asax file. When do you create an HTTP module over using Global.asax File?
You create an HTTP module over using Global.asax file if the following conditions are true

1. You want to re-use the module in other applications.
2. You want to avoid putting complex code in the Global.asax file.
3. The module applies to all requests in the pipeline.

Keywords:
what is http module in asp.net c#
iis http module
custom http modules
http module and http handler difference
iis http module authentication
mvc httpmodule
httphandler and httpmodule in asp net kudvenkat
httpmodule and httphandler details and difference between them
http module and http handler difference
httphandler c#
httpmodule and httphandler details and difference between them
iis http module
how can we create instance of http module
custom http modules
context.handler in asp.net c#
mvc httpmodule
httphandler c#
context handler in asp net c#
http handler java
http.handler golang
proper http handler order in request pipeline
http handlers in .net core
iis http module
.net framework httphandler
http module and http handler difference
iis http module authentication