언어

UriTemplate.IsEquivalentTo(UriTemplate) 메서드

정의

구조 UriTemplate 적으로 다른 항목과 동일한지 여부를 나타냅니다.

public:
 bool IsEquivalentTo(UriTemplate ^ other);
public bool IsEquivalentTo(UriTemplate other);
member this.IsEquivalentTo : UriTemplate -> bool
Public Function IsEquivalentTo (other As UriTemplate) As Boolean

매개 변수

other
UriTemplate

비교할 UriTemplate입니다.

반품

true 구조적으로 다른 값과 동일하면 UriTemplate 이고, 그렇지 않으면 false.

예제

다음 예제에서는 .IsEquivalentTo(UriTemplate)

UriTemplate template = new UriTemplate("weather/{state}/{city}?forecast={day}");
UriTemplate template2 = new UriTemplate("weather/{country}/{village}?forecast={type}");

bool equiv = template.IsEquivalentTo(template2);
Dim template As UriTemplate = New UriTemplate("weather/{state}/{city}?forecast={day}")
Dim template2 As UriTemplate = New UriTemplate("weather/{country}/{village}?forecast={type}")

Dim equiv As Boolean = template.IsEquivalentTo(template2)

설명

리터럴 문자열이 동일하고 변수가 동일한 세그먼트에 표시되는 경우 두 UriTemplate 인스턴스가 동일합니다. 예를 들어 "weather/{state}/{city}"는 "weather/{country}/{village}"에 해당합니다.

적용 대상