``` with open("x.txt") as file: #do something with file #`file.close()` called automatically ```
I know D's `with` statement does something different but is there some sort of equivalent?
Jonathan via Digitalmars-d-learn Tue, 27 Feb 2018 08:20:33 -0800
``` with open("x.txt") as file: #do something with file #`file.close()` called automatically ```
I know D's `with` statement does something different but is there some sort of equivalent?