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 extended method in c#

Answers were Sorted based on User's Feedback



What is extended method in c#..

Answer / ashish agrawal

Extension methods enable you to "add" methods to existing
types without creating a new derived type, recompiling, or
otherwise modifying the original type. Extension methods are
a special kind of static method, but they are called as if
they were instance methods on the extended type. For client
code written in C# and Visual Basic, there is no apparent
difference between calling an extension method and the
methods that are actually defined in a type.

class ExtensionMethods2
{

static void Main()
{
int[] ints = { 10, 45, 15, 39, 21, 26 };
var result = ints.OrderBy(g => g);
foreach (var i in result)
{
System.Console.Write(i + " ");
}
}
}
//Output: 10 15 21 26 39 45

Is This Answer Correct ?    11 Yes 5 No

What is extended method in c#..

Answer / ratheesh

The most common extension methods are the LINQ standard query operators that add query functionality to the existing System.Collections.IEnumerable and System.

Is This Answer Correct ?    2 Yes 0 No

What is extended method in c#..

Answer / aniket

small information : extension methods are nothing but visitor design pattern.

http://www.codeproject.com/Articles/34209/Extension-Methods-in-C

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is a concrete class in c#?

0 Answers  


What is the difference between icomparer and icomparable in c#?

0 Answers  


What is the difference between abstract and virtual?

0 Answers  


Can we inherit sealed class in c#?

0 Answers  


HOW to Develope the CRUD(create,read,update,delete) FORM IN WINDOWS form by using c# only

0 Answers   Petranics Solutions,


What are different types of Delegates in C#?

0 Answers   PUCIT,


Explain 'structure padding'?

0 Answers   DELL,


Why do we need delegates in c#?

0 Answers  


What are cshtml files?

0 Answers  


Is exe is machine dependent?

0 Answers  


What is the difference between array and arraylist in c#?

0 Answers  


How can I produce an assembly?

0 Answers  


Categories