Demonstrate an array overrun : Array : Collections Data Structure C# Source Code


Custom Search

C# Source Code » Collections Data Structure » Array »

 

Demonstrate an array overrun








    

// Demonstrate an array overrun. 
 
using System; 
 
public class ArrayErr {  
  public static void Main() {  
    int[] sample = new int[10]; 
    int i;  
  
    // generate an array overrun 
    for(i = 0; i < 100; i = i+1)  {
      sample[i] = i; 
    }  
  }  
}


           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Collections Data Structure
» Array