摘要: Class TestPatterns '> Public Shared Sub SelfDefining() Console.WriteLine(":: Pattern: Self-definining function") Dim foo As Action = Sub() Console.WriteLine("Hi there!") foo = Sub() ... 阅读全文
posted @ 2013-09-18 15:07 sekihin 阅读(380) 评论(0) 推荐(0)
摘要: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'データ配列 Dim companies() = New Company() { _ New Company("X01", "ABC com", 34), _ New Company("X02", "DEF inc", 19), _ New Company(... 阅读全文
posted @ 2013-09-18 15:06 sekihin 阅读(281) 评论(0) 推荐(0)
摘要: 1.扩展方法 (Extension Methods)给Person类扩展Print方法Public Module PersonExtension _ Public Sub Print(ByVal aPerson As Person) If aPerson IsNot Nothing Then Console.WriteLine("Istance of Person : " & aPerson.ToString()) Else Console.WriteLine("No instance of Person."... 阅读全文
posted @ 2013-09-18 09:03 sekihin 阅读(331) 评论(0) 推荐(0)