Oh Beth Massi, the girl I apparently have a huge crush on is presenting on the future of VB. She is talking about VB9 and some of the new features that are coming out.
So a lot of this is going to be on LINq. We did the standard LINq then LINq to SQL which I could not see as I was sitting way in the back.
The standard LINq stuff:
dim query = from c in me.Controls _
where typeof c is System.Windows.Forms.Button _
select ctype(c, button)
for each b in query
b.text = "Sweet"
next
We also talked about anonymous types. Anon types are actually created by the compiler by inspecting the properties referred to on the type after the fact and it creates a type on the fly. It is NOT the return of the variant type from vb6.
a good use of anon types (besides the linq stuff) is with arrays
for each v in {1,2,3,4}
console.WriteLine(v)
next
XMLLiterals
dim emp = _
<employee>
<name></name>
</employee>
and that is a full XML document you can access
She demo'd extension methods which is a nice way to add a method to an existing class (I could not read it from the back so I do not have an example of it). In Beth's example she extended strings to have a print method that would do a console.writeline of the string.
Unfortunately at this point I had to leave to go get Beth flowers (seriously)... we decided someone needed to be pranked this year so I am presenting her a bouquet in her question period. Pictures coming once people send me copies of the ones they took.