Thursday, February 3, 2011
Interface
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 oneabstract class. Since C# doesn't support multiple inheritance, Interface are used to implement multiple inheritance.
Abstract Class
An absrract 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 absrract 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.
How can exception be handled with out the use of try catch?
using Exception Management application block
or
Page_error
Application_error objects
Page_error
Application_error objects
Caching
In a very simple term caching is process of storing data in memory, frequently used data which is very costly to reproduce, is kept in a memory and re used. One of the ways to improve the throughput is to use caching in web pages. Caching is a tried and tested technique for performance improvement. HTML pages have been cached to improve the speed. An indirect example of caching could be connection pooling.
ASP.Net supports caching the Asp.net response page that is generated by requests and also storing individual objects in memory.
Delete Items from CacheItems are deleted from cache when the expiration is set or when the dependency file changes or when the server needs to free memory.
Cache.Remove("oString");
ASP.Net supports caching the Asp.net response page that is generated by requests and also storing individual objects in memory.
Three type of Caching in Asp.net
Page Output Caching ·
Page Fragment Caching
Data Caching
Delete Items from CacheItems are deleted from cache when the expiration is set or when the dependency file changes or when the server needs to free memory.
Cache.Remove("oString");
Subscribe to:
Comments (Atom)