What features are heavily used in C # 2.0 but not available in VBNET 2.0, and how do I get around?
I don't want a war between VB.NET and C # developers, and my goal is to open the C # VS VB.NET confrontation.
I would like you all to point out a feature that is heavily used in C # but not available in VB.NET 2.0, and how would you work to achieve similar behavior or goal?
For instance:
FROM#
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 cannot be done before VB.NET 4.0 (assuming it is executable in VB.NET 4.0)
VB.NET
Should write a help method (Sub) and provide AddressOf this method to work around.
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 this is not VB.NET 2.0, but this is an example. VB.NET 3.0 and 3.5 can be used too. Please just indicate which VB.NET version this applies to.
a source to share
For me, something I missed is the implicit interface definitions:
ISomething
{
void Execute();
}
class ASomething : ISomething
{
public void Execute()
{
//Do something
}
}
Perfectly. In VB.net, you have to explicitly mark a method as an implementation of an interface, which I find quite annoying. I know there are people who prefer this technique, but not for me ...
a source to share