Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is lamda expression?

Answer Posted / wasimhajwane

lambda expression :
Lambda expression is introduce in c# version 3.0.Its a method without having declaration,
A lambda expression is a anonymous function mostly used to create delegate in LINQ.
 Syntax:

parameter => expression or statement block.

simple program to understand lambda expreesion


class A
{
// we have to declare delegate here

public delegate int B(int a);

static void main()
{
B b=a=>a*a;
int res=b(5);
Console.WriteLine("result = ",res);
}
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the usage of Enumeration in C# Programming and is it good to use or not ?

920


What is iqueryable and ienumerable in c#?

901


How do you escape a character?

887


What is platform independence"?

892


What is the difference between the debug class and trace class? Documentation looks the same.

1046


Can a string be null c#?

841


What is dapper in c#?

879


Are constructors inherited c#?

843


Can a static class contain non static members?

929


If you define a user defined data type by using the class keyword, is it a value type or reference type?

832


Can abstract class have constructor c#?

812


Is xamarin free?

797


Why is c# a good programming language?

916


What is the difference between int and int in c#?

934


How does return work in c#?

906