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

  • Home
  • SEARCH
  • 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 7930141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:19:33+00:00 2026-06-03T20:19:33+00:00

We all know that it’s good practice to create small methods that promote reuse,

  • 0

We all know that it’s good practice to create small methods that promote reuse, which inevitably will cause lots of methods being placed on the stack. However is it possible to reach the scenario where there are so many nested methods calls that a StackOverflow Exception occurs?

Would the accepted solution to be simply increase the stack size?

The documentation states that a such an exception will occur during “very deep or unbounded recursion” so it certainly seems possible, or does the .NET framework dynamically handle stack size for us?

My question can be summed up like so:

Is it possible to have such a well designed program (in
terms of small reusable methods) that is becomes necassary to increase the
stack size and hence use more resources?

  • 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-03T20:19:35+00:00Added an answer on June 3, 2026 at 8:19 pm

    Not really. I just did a very quick test, and a StackOverflowException occurs after 15,000 nested calls.

    There’s no way you’ll be writing code that will non-recursively nest 15,000 times due to the sheer number of methods you have.

    Obviously the exact number depends on many function-local variables you have allocated on the stack. But whatever that actual number may be, it is nowhere near enough to do what you’re suggesting.

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

Sidebar

Related Questions

We all know that Debug.Assert will not be compiled into the dlls when compiled
We all know that global variables are anything but best practice. But there are
We all know that for relational databases it is best practice to use numerical
We all know that we should rather reuse a JDBC PreparedStatement than creating a
We all know that having a good note taking tool is important as a
We all know that refactoring is good and I love it as much as
I believe that we are all know that setUp (@Before) will execute before any
We all know that CSS sprite images are great to reduce the amount of
We all know that a hash table has O(1) time for both inserts and
We all know that most applications out there assume class names to follow the

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.