int array Value Equals - CSharp System

CSharp examples for System:Array Equal

Description

int array Value Equals

Demo Code

// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.
using System.Diagnostics;
using System;// w  w w. j a  v a  2s. com

public class Main{
        internal static bool ValueEquals(this uint[] array, uint[] other)
        {
            if (array == other)
            {
                return true;
            }

            if (array == null || other == null || array.Length != other.Length)
            {
                return false;
            }

            for (int i = 0; i < array.Length; i++)
            {
                if (array[i] != other[i])
                {
                    return false;
                }
            }

            return true;
        }
}

Related Tutorials