I don't want a war between VB.NET and C# developers, neither is my goal to open a C# VS VB.NET confrontation.
I would like you all to list a feature that is heavily used in C#, but is not available in VB.NET 2.0, and how would you work around to achieve a similar behaviour or purpose?
For example:
C#
Accepts void (return) lambda expressions. Here's an example with FNH mapping:
Component(x => x.Address, m => {
m.Map(x => x.Number);
m.Map(x => x.Street);
m.Map(x => x.PostCode);
});
This is impossible to do before VB.NET 4.0 (supposed to be doable in VB.NET 4.0)
VB.NET
Must write a helping method (Sub), and provide the AddressOf this method in order to workaround.
Private Sub Helper(ByVal m As MType)
m.Map(Function(x) x.Number)
m.Map(Function(x) x.Street)
m.Map(Function(x) x.PostCode)
End Sub
...
Component(Function(x) x.Address, AddressOf Helper)
Now I know, it is not VB.NET 2.0, but this is an example. VB.NET 3.0 and 3.5 can used too. Please just mention what version of VB.NET this refers to.