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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:42:52+00:00 2026-05-27T21:42:52+00:00

Sorry for the confusing title. Basically I made a BinaryReader class that reads in

  • 0

Sorry for the confusing title. Basically I made a BinaryReader class that reads in big endian and set its constructor up as:

BinaryReader2(System.IO.Stream strm) : base(strm){}

I was told that you can’t call the base class’s constructor any other way, and that this was the best way to do it.

The problem is that when another program has control of a file I’m trying to read, it doesn’t display any error messages (because I’m new to programming and didn’t set up any try catch statements..). So, I’m trying to account for all the possible situations by using try-catch statements. I’ve never used them before, so I was hoping I could get a few pointers on it.

I created the binaryreader2 class in many places throughout the program and was hoping I could set up the try catch inside the binaryreader class itself instead of in each of the places I used it. Is it possible to do that and still call the base class’s constructor?

  • 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-27T21:42:53+00:00Added an answer on May 27, 2026 at 9:42 pm

    One possible workaround: Use composition over inheritance. this way you have a better control on initializing the formerly base object.

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

Sidebar

Related Questions

Sorry for the confusing title, but it basically says it all. Here's the structures
sorry for the confusing title, its really hard for me to explain what i
Sorry about the confusing title. Are there any web IDEs available that can be
Hello everybody and sorry for the rather confusing question-title. I have a Hibernate Class
I'm sorry for the little confusing title but say I have a class with
Sorry about that confusing title :) I have a resource, ComatosePage (used in the
Sorry if the question title is confusing. Let me explain further. I am building
I'm sorry if the title is quite confusing but I am wondering if it's
Sorry the title isn't more help. I have a database of media-file URLs that
Sorry for the confusing title :P I'm sure I should know this but I

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.