You are on page 1of 14

Module 5

Enumeration Collections:
The types of collections available in .NET framework may differ greatly in terms of
complexity; for example, an array and linked list are considered relatively simpler being
linear data structures, as compared to non-linear data structures such as hash tables and
red/black trees. These data structures have different characteristics and properties but
traversing a data structure is common amongst all of the major data structures. For this
purpose, .NET framework provides two interfaces i.e. IEnumerable and IEnumerator along
with the generic versions i.e. IEnumerable<T> & IEnumerator <T> for generic collections.
Ex:
[modifier] delegate [return_type] [delegate_name] ([parameter_list]);
Initialize:
[delegate_name] [instance name] = new [delegate
name](calling_method_name);

o/p:
EVENTS IN C#:
LANGUAGE INTEGRATED QUERY

LINQ OPERATIONS:
Selecting:
The select clause produces the results of the query and specifies the "shape" or type of each
returned element.

Ex:

O/P
Advantages of LINQ:

DISADVANTAGES OF LINQ:
OR ADVANTAGES & DISADVANTAGES FOR LINQ:

OPERATOR OVERLOADING:
Operator overloading is a concept in which operator can defined to work with the user
defined data types such as structs and classes in the same way as the pre-defined data types.
Ex:
Program to Overload increment & decrement operator:
Program to overload binary operator:

You might also like