Why extension method is static?



Why extension method is static?..

Answer / Himanshu Singh

Extension methods are static to ensure that an instance of the extended class does not have to be created for the extension method to work. This way, they can extend existing classes without requiring access to non-static members.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Explain synchronous and asynchronous operations?

1 Answers  


How does dictionary work in c#?

1 Answers  


What is the use of multicast delegate while methods of multicast delegate do not execute in a order?

2 Answers  


hi , how could i analyse a text the user added on a site to look for some words like "car" "shouffere" .. and then i can use that information in addition to other information to make a decision about the adds im going to to show on the site.

1 Answers  


How will you deploy the dll file in gac?

1 Answers  


Why delegate is used in c#?

1 Answers  


Does the variables of a private class-level inherited?

1 Answers   Siebel,


What is a delegate how is it type safe?

1 Answers  


When you inherit a protected class-level variable, who is it available to?

4 Answers   Visual Soft,


What are Uses of CLR

1 Answers   TCS,


How do I type a whitespace character?

1 Answers  


What is Inheritance in C#?

2 Answers   B-Ways TecnoSoft,


Categories