Check out example codes for "how to generate random unique id in c#". It will help you in understanding the concepts better.

Code Example 1

public Random a = new Random(); // replace from new Random(DateTime.Now.Ticks.GetHashCode());
                                // Since similar code is done in default constructor internally
public List<int> randomList = new List<int>();
int MyNumber = 0;
private void NewNumber()
  	MyNumber = a.Next(0, 10);
    	MyNumber = a.Next(0, 10);

Learn ReactJs, React Native from