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 8087017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:38:10+00:00 2026-06-05T18:38:10+00:00

I have a TextReader which has been created by a black-boxed system so I

  • 0

I have a TextReader which has been created by a black-boxed system so I don’t have any information about the source file from which it was created.

I need to pass this TextReader back into the black-boxed system inside an object which I am creating in my application.

However, I need to get some information from the TextReader to assist with the creation of my object.

I understand that you can’t “rewind” a TextReader but is there a way to duplicate it so that I can read and discard a temporary copy without advancing the source TextReader at all?

I have had a look at this SO thread but I’m not sure if that relates to my requirement.

If it does, could someone please elaborate so I can understand?

Thanks in advance.

  • 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-06-05T18:38:12+00:00Added an answer on June 5, 2026 at 6:38 pm

    Well sort of hack, but you can do like this, ReadToEnd the entire text in a string, do what you want, and pass back a new StringReader created with the string you read before. I expect the blackboxed system will work like a charm.

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

Sidebar

Related Questions

I have a problem which I have been bashing my head against for the
I have a custom built menu system in which I would like to load
I have written a boolean method which can be called upon to read information
I have a string which I read in from : TextReader tr = new
I have to read line-by-line a log file. It's about 6MB in size and
I have a program which reads a text file and processes it to be
I have a program which processes a text log file and tokenizes the text
I have a class which extends BufferedReader, and a list of file streams b.close()
I have created an object called Project that has different properties (strings and some
Have a SomeLib.pro file that contains: CONFIG += debug TEMPLATE = lib TARGET =

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.