Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumC#IDisposable and finalizersSingle-choice MCQ

A struct implements IDisposable and is used in a using statement. What does the compiler do that differs from the class case?

struct Handle : IDisposable { public void Dispose() { } } using (var h = new Handle()) { /* ... */ }