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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:38:21+00:00 2026-05-15T06:38:21+00:00

For example, let’s use the Add method of the ArrayList class. If I am

  • 0

For example, let’s use the Add method of the ArrayList class. If I am using the default compiler settings in Visual Studio C# project in which arithmetic overflow is not checked, would ArrayList.Add() throw an OverflowException if I added too many items? Would surrounding the method call with checked or unchecked make any difference?

BTW, I would write a test program to determine the answer to this question if I had Visual Studio available to me right now.

  • 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-15T06:38:22+00:00Added an answer on May 15, 2026 at 6:38 am

    In general no the BCL does not run with overflow checking enabled. Enabling it in your application will have no affect on already compiled binaries only on your code.

    Imagine all of the problems that would arise if you could control how the BCL code executed. Every time you authored an arithmetic expression you would have to consider how it would function in both scenarios in order to have 100% reliable code. Because anyone could change the semantics by using a checked / unchecked block to call you.

    Think of all of the fun you could have with security sensitive API’s if you could turn off overflow checking in places they expect it to function.

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

Sidebar

Ask A Question

Stats

  • Questions 498k
  • Answers 498k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Try giving full https://*/* permission (if you have only site… May 16, 2026 at 12:17 pm
  • Editorial Team
    Editorial Team added an answer If I got it right, you can accomplish this using… May 16, 2026 at 12:17 pm
  • Editorial Team
    Editorial Team added an answer An integer does not have decimal fractions, so the validation… May 16, 2026 at 12:17 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

For Example: Let's say that I want to return a view that displays a
Simpler Example Let's try a simpler example, so people can wrap their heads around
A simple example: Let's say I have one alias being sourced somewhere as: alias
A simplified example: // Let's create a new object function MyObject() { // }
Currently I am having three sites for example let it be site1, site2 and
Can rails handle creating a view without a controller? For example, let say I
I write some code to learning F#. Here is a example: let nextPrime list=
how can I replace 2 strings in the same time? for example let's say
What's the best way to thread work (methods) in c#? For example: Let's say
I have a function which is constant to its argument, for example let is_prime

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.