Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3695482
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:37:23+00:00 2026-05-19T04:37:23+00:00

I was reading about StreamWriter today, and came across this property, BaseStream . I

  • 0

I was reading about StreamWriter today, and came across this property, BaseStream.

I was looking for a definition and found this

“Gets the underlying stream that interfaces with a backing store.”

from here MSDN – StreamWriter.BaseStream

I understand what a BaseStream is for StreamReader, because it’s definition is very simply:

Returns the underlying stream.

But what does the definition of the StreamWriter.BaseStream mean?? Or more clearly, what does this part of the definition mean “interfaces with a backing store”? That sounds like gibberish to me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T04:37:24+00:00Added an answer on May 19, 2026 at 4:37 am

    You’re right; it does seem unnecessarily wordy, especially in comparison with the analogous StreamReader.BaseStream. In reality, it just returns a reference to the underlying stream, exactly like StreamReader.

    I think the presumption of the description is that writing to the underlying stream will involve saving the written data to some sort of persistent store, such as a file. Of course, this isn’t necessary at all in reality (in the worst case, it could simply do nothing).

    If you really wanted to extrapolate, you could interpret that as meaning that the underlying stream’s CanWrite property is true (at least at the point it was attached to the StreamWriter).


    To be convinced that it really is just returning the underlying stream, here’s the decompiled code from Reflector:

    public virtual Stream BaseStream
    {
        [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        get
        {
            return this.stream;
        }
    }
    

    where the stream field is assigned in the Init method:

    private void Init(Stream stream, Encoding encoding, int bufferSize)
    {
        this.stream = stream;
       ...
    

    which in turn is called by the constructor with the argument being the attached stream:

    [SecuritySafeCritical]
    public StreamWriter(Stream stream, Encoding encoding, int bufferSize) 
      : base(null)
    {
        ...
        this.Init(stream, encoding, bufferSize);
    }
    

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While reading about bitmap processing in C++ I came across this block of code
I was reading about imports in python and came across this effbot article about
While reading about mcv3 I came across an attribute name called [ActionName] . It
While reading about abstraction, I came across the following statement Abstraction captures only those
While reading about shell scripts and temporary file handling, I came across Symlink Exploits.
Reading about the G.729 codec , I found this interesting tidbit about Comfort Noise
Reading about Kohana templates and saw something I've never seen before: $this->template->title = __('Welcome
Reading about Django, I saw this: http://docs.djangoproject.com/en/1.1/ref/contrib/admin/#ref-contrib-admin - the fancy simple to use admin
While reading about exception, I will always come across checked exceptions and unchecked exceptions,
After reading about the defer attribute at mdn This Boolean attribute is set to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.