views:

45

answers:

1

I don't understand what does the overloaded term mean in the context of msdn library's page for MemoryStream Close method (or others like Dispose).

See the page here. To me, overloaded points out the fact that you are providing a method with the same name but different signature than an existing one AND in the same class.

In this case, there's no existing Close method. Shouldn't it be override instead? Thanks!

+1  A: 

Hmm... it looks more like an MSDN glitch. From what I can see MemoryStream doesn't override, overload or re-declare (new) the Close() method. Not sure what MSDN is up to, to be honest.

I wonder if this distinction only exists for documentation purposes, because there are no unmanaged resources for a MemoryStream (and indeed the underlying buffer is still available).

Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream.

vs

Closes the stream for reading and writing.

it does override Dispose(bool), though.

Marc Gravell