Users Pricing

forum

Home Forums MemoryStream in Using Statement - Do I need to call close() – MindStick

MemoryStream in Using Statement - Do I need to call close()

Jayden Bell 2495 03 Feb 2014

When using a memory stream in a using statement do I need to call close? For instance is ms.Close() needed here?

  using (MemoryStream ms = new MemoryStream(byteArray)) 
    { 
      // stuff
      ms.Close();
    }

1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md