Color.Equals 메서드
정의
오버로드
Equals(Color) |
현재 개체가 동일한 형식의 다른 개체와 같은지 여부를 나타냅니다.Indicates whether the current object is equal to another object of the same type. |
Equals(Object) |
지정된 개체가 Color 구조체인지 여부 및 이 Color 구조체와 동일한지 여부를 테스트합니다.Tests whether the specified object is a Color structure and is equivalent to this Color structure. |
Equals(Color)
현재 개체가 동일한 형식의 다른 개체와 같은지 여부를 나타냅니다.Indicates whether the current object is equal to another object of the same type.
public:
virtual bool Equals(System::Drawing::Color other);
public bool Equals (System.Drawing.Color other);
override this.Equals : System.Drawing.Color -> bool
Public Function Equals (other As Color) As Boolean
매개 변수
- other
- Color
이 개체와 비교할 개체입니다.An object to compare with this object.
반환
현재 개체가 other
와 같으면 true
이고, 그렇지 않으면 false
입니다.true
if the current object is equal to other
; otherwise, false
.
구현
적용 대상
Equals(Object)
public:
override bool Equals(System::Object ^ obj);
public override bool Equals (object obj);
override this.Equals : obj -> bool
Public Overrides Function Equals (obj As Object) As Boolean
매개 변수
- obj
- Object
테스트할 개체입니다.The object to test.
반환
obj
가 이 Color 구조체와 동일한 Color 구조체인 경우 true
를 반환하고, 그렇지 않으면 false
를 반환합니다.true
if obj
is a Color structure equivalent to this Color structure; otherwise, false
.
설명
이 구조는 다른 구조체와 비교 Color 합니다.This structure only does comparisons with other Color structures. ARGB 값만을 기준으로 색을 비교 하려면 메서드를 사용 해야 합니다 ToArgb .To compare colors based solely on their ARGB values, you should use the ToArgb method. 이는 Equals 및 Equality 멤버가 색의 ARGB 값을 초과 하는 값을 사용 하 여 등가를 결정 하기 때문입니다.This is because the Equals and Equality members determine equivalency using more than just the ARGB value of the colors. 예를 들어 Black , FromArgb(0,0,0)
Black 는 이름이 지정 된 색이 고가 아니기 때문에 및은 같다고 간주 되지 않습니다 FromArgb(0,0,0)
.For example, Black and FromArgb(0,0,0)
are not considered equal, since Black is a named color and FromArgb(0,0,0)
is not.