C2019-026 Move a byte array comparer function to the Volian.Base.Libary and made it static C2019-026 Took a byte array comparer function from ROFSTExt.cs and made it static
		
			
				
	
	
		
			23 lines
		
	
	
		
			609 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			609 B
		
	
	
	
		
			C#
		
	
	
	
	
	
using System;
 | 
						|
using System.Collections.Generic;
 | 
						|
using System.Linq;
 | 
						|
using System.Text;
 | 
						|
using System.Threading.Tasks;
 | 
						|
 | 
						|
namespace Volian.Base.Library
 | 
						|
{
 | 
						|
	public static class ByteArrayCompare
 | 
						|
	{
 | 
						|
		// C2019-026 Took this from ROFSTExt.cs so that we can also use when importing procedures with library documents
 | 
						|
		public static bool DoCompare(byte[] ba1, byte[] ba2)
 | 
						|
		{
 | 
						|
			// we wrote our own byte array comparison because the system's 'equals' did not work!
 | 
						|
			if (ba1.Length != ba2.Length) return false;
 | 
						|
			for (int i = 0; i < ba1.Length; i++)
 | 
						|
				if (ba1[i] != ba2[i]) return false;
 | 
						|
			return true;
 | 
						|
		}
 | 
						|
 | 
						|
	}
 | 
						|
}
 |