Array Contains Index - CSharp System

CSharp examples for System:Array Index

Description

Array Contains Index

Demo Code


using System.Text;
using System.Linq;
using System.Collections.Generic;
using System;//from w w w  .  j  a v a 2s. c om

public class Main{
        public static bool ContainsIndex<T>(this T[] arr, uint index)
         where T : class
      {
         return index < arr.Length && arr[index] != null;
      }
}

Related Tutorials