OpenBveApi.Sounds.Sound.operator C# (CSharp) Méthode

operator() public static méthode

Checks whether two sound are equal.
public static operator ( ) : bool
Résultat bool
		public static bool operator ==(Sound a, Sound b) {
			if (object.ReferenceEquals(a, b)) return true;
			if (object.ReferenceEquals(a, null)) return false;
			if (object.ReferenceEquals(b, null)) return false;
			if (a.MySampleRate != b.MySampleRate) return false;
			if (a.MyBitsPerSample != b.MyBitsPerSample) return false;
			if (a.MyBytes.Length != b.MyBytes.Length) return false;
			for (int i = 0; i < a.MyBytes.Length; i++) {
				if (a.MyBytes[i].Length != b.MyBytes[i].Length) return false;
				for (int j = 0; j < a.MyBytes[i].Length; j++) {
					if (a.MyBytes[i][j] != b.MyBytes[i][j]) return false;
				}
			}
			return true;
		}
		/// <summary>Checks whether two sounds are unequal.</summary>