Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Common Elements

Qrist Apr 7th, 2020 176 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Linq;
  3.  
  4. namespace GitHub
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             string[] firstArr = new string[] { "Hey", "Hello", "2", "4" };
  11.             string[] secondArr = new string[] { "10", "Hello", "2", "8" };
  12.             string[] result = new string[secondArr.Length];
  13.             int length = Math.Min(firstArr.Length, secondArr.Length);
  14.             for (int i = 0; i < length; i++)
  15.             {
  16.                 if (firstArr.Contains(secondArr[i]))
  17.                 {
  18.                     result[i] = secondArr[i];
  19.                 }
  20.             }
  21.             Console.WriteLine(string.Join(" ", result));
  22.         }
  23.     }
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top