Answers for "check array index exists c#"

C#
0

c# check if index exist

int index = 25;
if(index < array.Length)
{
    //it exists
}
Posted by: Guest on September-29-2020
0

check if that inex exisits array c#

var array=new List<int>(1,2,3);
int count=5;
for(int i=0;i<count;i++){
	if(array.Count>i){  //this is way you can check wheater 
      	//do something   //index count equals to array count
	}
}
Posted by: Guest on June-26-2020

Code answers related to "check array index exists c#"

C# Answers by Framework

Browse Popular Code Answers by Language