Aug 21

C# Simple Delegate Example

C# Simple Delegate Example

A delegate in C# is similar to a function pointer in C or C++. Using a delegate allows the programmer to encapsulate a reference to a method inside a delegate object. The delegate object can then be passed to code which can call the referenced method, without having to know at compile time which method will be invoked.

Read the rest of this entry »

Permanent link to this article: http://www.zappmania.in/2016/08/21/c-sharp-simple-delegate-example.htm

Aug 21

Combine Two Delegates C#-Example

Combine Two Delegates C#

A delegate in C# is similar to a function pointer in C or C++. Using a delegate allows the programmer to encapsulate a reference to a method inside a delegate object. The delegate object can then be passed to code which can call the referenced method, without having to know at compile time which method will be invoked.

A delegate can define its own type parameters. The generic delegate can specify the type argument to create a closed constructed type. The multicast delegate consists of a list of the assigned delegates. When the multicast delegate is called, it invokes the other delegates in the list in order. Only delegates of the same type can be combined.

Read the rest of this entry »

Permanent link to this article: http://www.zappmania.in/2016/08/21/combine-two-delegates-c-sharp-example.htm

Aug 21

LINQ Aggregate Methods C#-Example

LINQ Aggregate Methods C#

LINQ is language integrated query which allow programmers to query various objects without worrying about underlying implementations of these objects.

There are number of LINQ Aggregate methods defined in Enumerable class Read the rest of this entry »

Permanent link to this article: http://www.zappmania.in/2016/08/21/linq-aggregate-methods-c-sharp-example.htm

Aug 21

LINQ Calculate Average File Size in Folder C#-Example

LINQ Calculate Size of Folder

LINQ is language integrated query which allow programmers to query various objects without worrying about underlying implementations of these objects.

Below C# Program Calculates average file Size of folder using LINQ. In other words the average size of file in a folder is found using LINQ functions.
Read the rest of this entry »

Permanent link to this article: http://www.zappmania.in/2016/08/21/linq-calculate-average-file-size-c-sharp-example.htm

Aug 19

Check Leap Year C#-Example

Program to Check Leap Year

This C# Program Checks Whether the Entered Year is a Leap Year or Not.
When A year is divided by 4, If remainder is 0 then the year is called a leap year.
Below is a C# Program to Check Whether the Entered Year is a Leap Year or Not.

Read the rest of this entry »

Permanent link to this article: http://www.zappmania.in/2016/08/19/check-leap-year-c-example.htm

Older posts «