Horje
how to remove an element from an array c# Code Example
how to remove an element from an array c#
static void Main(string[] args)
{
  int[] arr = { 1, 3, 4, 9, 2 };
  int numToRemove = 3;
  var numIndex = arr.Where(x=>x ==numToRemove);
  if(numIndex.Any()){
    var idx = Array.IndexOf(arr,numToRemove);
  	var remove = arr.Remove(idx);
  }
}  
remove from array c#
// easier to convert to list and remove
int[] arrayToConvert = new int[] {1, 2, 3, 4};

List<int> converted = new List<int>(arrayToConvert);
converted.RemoveAt(0);
// do this if you cant use list instead of array




Csharp

Related
asp.net mvc temp data Code Example asp.net mvc temp data Code Example
teleport in vue Code Example teleport in vue Code Example
get diff btw datetimes two C# Code Example get diff btw datetimes two C# Code Example
how to remove all comma from string c# Code Example how to remove all comma from string c# Code Example
unity get prefabs from folder Code Example unity get prefabs from folder Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9