Abc.NCrafts.Quizz.Performance.Questions._001.Answer1.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        public static unsafe void Run()
        {
            var value = _random.Next(0, 500);
            var hasValue = false;
            // begin
            fixed (int* p = _items)
            {
                for (var index = 0; index < _items.Length; index++)
                {
                    if (p[index] == value)
                    {
                        hasValue = true;
                        break;
                    }
                }
            }
            // end
            Logger.Log(hasValue ? "Found!" : "Not found :'(");
        }
    }