Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Linq;
- using System;
- namespace Remove
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[] numbers = { 1, 3, 4, 9, 2 };
- int numToRemove = 4;
- numbers = numbers.Where(val => val != numToRemove).ToArray();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement