Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyC#using statement and disposalSingle-choice MCQ

In this code, when is the StreamReader's Dispose() called relative to the return statement?

static string ReadFirstLine(string path) { using var reader = new StreamReader(path); return reader.ReadLine(); }