skip to main
|
skip to sidebar
Bamboo's Programming Diary
Monday, June 14, 2010
Extension Method
public
static
{Method Return type} {Method Name}
(this
{The Class to Extend} {Parameter Name}
)
public static int
IsOdd
(
this
int
value)
{
return value%2 != 0
}
Extension method must in static class.
must declared as public and static.
delegate
{Modifier}
delegate
{Method Return type} {Delegate Name}
(
{Parameter type} {Parameter Name}
)
public delegate int
MyIntDelegate
(int number);
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)
Followers
Blog Archive
▼
2010
(6)
►
December
(1)
►
September
(1)
▼
June
(2)
Extension Method
delegate
►
May
(1)
►
April
(1)
About Me
BambooSam
View my complete profile