InterviewSolution
| 1. |
How to use Extension Methods in C# |
|
Answer» Extension methods is a new feature of C# 3.0 that allows you to enhance an existing FRAMEWORK CLASS by adding a new method to it without modifying the ACTUAL code of that class.Suppose you want to calculate the 4th power of an integer. For that you will have to square it two times. So instead of that you can create an Extension Method on integer |
|