Archive for January 2016
C#.NET Collections
Collections are used to store multiple values of object type. Memory for items is allocated dynamically and they can be accessed using indexes.Collection classes are available under System.Collections namespace.Types of collections are:ArrayListStackQueueHashTable
ArrayList
It.
C#.NET Exception Handling
Exception
Exceptions are the runtime errors that leads to abnormal termination of program.
Exception handling
It is a mechanism to handle the abnormal termination of program because of runtime errors. We can handle exceptions using try catch block..
C#.NET Delegate
Delegate is a type which can hold reference of multiple methods.
All the methods should have same signature of the delegate.
It contains return type.
The i/o parameters of the delegate should be exactly same as i/o parameters of the method.
Semicolon.
Abstract class VS Interface
Abstract class can contain abstract methods and general methods.
Interface can contain only abstract methods.
All the methods in interface by default public and abstract..
C#.NET Interface
Interface is a collection of "abstract methods".
All the methods in interface will be abstract methods.
A class inheriting interface should implement abstract methods present in that interface.
Multiple inheritance is possible in interfaces.
Body.