1
두 ColorBlends
에 다른 Colors
값이 있는지 어떻게 확인할 수 있습니까?ColorBlends를 비교하십시오
는 다음 코드
을 시도ColorBlend Blend1 = new ColorBlend();
Blend1.Colors = new Color[] { Color.White, Color.Black };
Blend1.Positions = new float[] { 0.0f, 1.0f };
ColorBlend Blend2 = new ColorBlend();
Blend2.Colors = new Color[] { Color.White, Color.Black };
Blend2.Positions = new float[] { 0.0f, 1.0f };
if (Blend1.Colors != Blend2.Colors)
{
MessageBox.Show("Values are Different");
}
Colors
값이 모두 Blends
에 대해 동일 할 때, 그것은 여전히 동일하지 않은 말했다 때문에 작동하지 않습니다!
때때로 하나의 블렌드가 더 많은 색상을 가지기 때문에 루프를 사용할 수 없기 때문에 – Adrao
이 대답은 도움이 될 수 있습니다. http://stackoverflow.com/questions/1673347/linq - 두 개의 시퀀스를 결정하는 경우 - 정확히 동일한 요소를 포함 – TGH