With

Topics: C# Language Design
Mar 16, 2015 at 7:26 AM
About the only feature I like in VB could be used in C#, and it would be good if it returns the object in use, just the bracing and indentation(Collapsible) would make the intentional logic easier to follow.

for example

private BatchOperation _batch;
.....
public void Process(){
    _batch = new BatchOperation();
    _batch.Start();
    with(_batch)   //Just Neatens it up a bit
    { 
            .DoTaskA();
            .DoTaskB();
    }
   _batch.End();

    //or using and returned types 
    with(_batch.Begin()){
            .DoTaskA();
            .DoTaskB();
    }.End();            
}
Mar 16, 2015 at 8:41 AM
The discussions have moved to https://github.com/dotnet/roslyn/