I am going to start the Visual Basic 9.0 cutting-edge broadcast at the blog Hall and other visitors. The content covers all the new language features and the combination of related XLinq/DLinq apis under the current design of VB9. The following is the Content preview
Static
I. Prediction of local variable types and array Initiators
Dim a = 5
Dim arr = {1, 2, 3}
Ii. Object initializer and anonymous type
Dim a = New Employee {. Name = "Jack",. Age = 27}
Dim B = New {. Date = Now,. Quantity = 1000}
Dim d = New List (Of String) {"a", "B", "cc "}
Iii. Extension methods
<Extension> Function Where (Of T) ([Me] As IEnumerable (Of T), predicate As Func (Of T, Boolean) As Query (Of T)
4. Embedded functions and Closure.
Sub
Sub B: End Sub
End Sub
V. Query Comprehension
Dim result = Select c. Name, C. Age From c In mers MERs Where c. ID> 10500
6. Relaxed Delegation
VII. Empty type
Dim I? As Integer = Nothing
Dynamic
I. Dynamic identifier
Dim prop = "Length"
Dim str = "abc"
Dim I As Integer = str. (prop)
Ii. Dynamic Interface (strong Type Duck Type)
Dynamic Interface IHasLength
ReadOnly Property Length As Integer
End Interface
Dims = "1234"
Dim ihl As IHasLength = s
Dim I = ihl. Length
Iii. XML literal
Dim x = <Root> <productid = "123"> Description </Product> </Root>
Iv. Later binding of XML
Dim y As String = x. Root. Product. @ Id