星期四, 8月 12, 2010

NET 擴充方法

參見

C#:

public static class ExtendTest
{
 public static int Test(this string str) //for u want type
  { // ...}
}


VB:

<Extension()> _
Public Sub Test(byval str as String) 'for u want type
  ' .....
End Sub

沒有留言: