System.IndexOutOfRangeException Class
Information   Base Types   Related Resources

The exception that is thrown when an attempt is made to access an element of an array with an index that is outside the bounds of the array. This class cannot be inherited.

  • Namespace: System
  • First seen in: .NET v1.0.3705
  • Last seen in: .NET v1.1.4322
  • Last changed in: .NET v1.0.3705
  • Assembly: mscorlib.dll

  • System.SystemException
  • View this type on MSDN
  • View this type on WinFX 247
    Articles (5)Discussions (113)MembersRotorChanges
    Articles

    Page: 1
    Array Types in .NET
    MSDN
    Arrays are mechanisms that allow you to treat several items as a single collection. The Microsoft® .NET Common Language Runtime (CLR) supports single-dimensional arrays, multidimensional arrays, and jagged arrays (arrays of arrays). All array types are implicitly derived from System.Array, which itself is derived from System.Object. This means that all arrays are always reference types which are allocated on the managed heap, and your app's variable contains a reference to the array and not the array itself.
    How Can You Migrate Your Existing Applications?
    C# Corner
    When a new technology emerges, companies and developers begin to wait anxiously for answers to their questions. Programmers need to learn about the new stuff because they want to use the new tools to develop their projects. Companies always want to move to new technology and build new products therefore; developers need to improve their knowledge and ability constantly to maintain their job against the new technology developers. Now, to learn and move to .NET environment is the answer to all these necessities. Our first objective is Visual C++ and migrating with .NET.
    HOW TO: Make a Visual Basic .NET Class Usable in a For Each Statement (Q322025)
    Microsoft Support
    This step-by-step article demonstrates how to use the
    Quick Code for Fast Array Access
    Visual Studio Magazine
    Each time an element of an array is accessed, the CLR ensures that the index is within the array's bounds. This prevents you from accessing memory that is outside of the array, which would potentially corrupt other objects. If an invalid index is used to access an array element, the CLR throws a System.IndexOutOfRangeException exception. As you might expect, the CLR's index checking comes at a performance cost. If you have confidence in your code and if you don't mind resorting to nonverifiable (unsafe) code, you can access an array without having the CLR perform its index checking.
    Rich Custom Error Handling with ASP.NET
    MSDN
    Add your own custom error handling to your ASP.NET Web applications to ease debugging and improve customer satisfaction.
    Ad
    MBR BootFX
    Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
     
     Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
    Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com