Uri.MakeRelative(Uri) 메서드

정의

주의

Uri.MakeRelative has been deprecated. Use MakeRelativeUri(Uri uri) instead.

주의

The method has been deprecated. Please use MakeRelativeUri(Uri uri). https://go.microsoft.com/fwlink/?linkid=14202

주의

Uri.MakeRelative has been deprecated. Use MakeRelativeUri(Uri uri).

주의

The method has been deprecated. Please use MakeRelativeUri(Uri uri). http://go.microsoft.com/fwlink/?linkid=14202

Uri 인스턴스 간의 차이를 결정합니다.

public:
 System::String ^ MakeRelative(Uri ^ toUri);
[System.Obsolete("Uri.MakeRelative has been deprecated. Use MakeRelativeUri(Uri uri) instead.")]
public string MakeRelative(Uri toUri);
[System.Obsolete("The method has been deprecated. Please use MakeRelativeUri(Uri uri). https://go.microsoft.com/fwlink/?linkid=14202")]
public string MakeRelative(Uri toUri);
[System.Obsolete("Uri.MakeRelative has been deprecated. Use MakeRelativeUri(Uri uri).")]
public string MakeRelative(Uri toUri);
[System.Obsolete("The method has been deprecated. Please use MakeRelativeUri(Uri uri). http://go.microsoft.com/fwlink/?linkid=14202")]
public string MakeRelative(Uri toUri);
public string MakeRelative(Uri toUri);
[<System.Obsolete("Uri.MakeRelative has been deprecated. Use MakeRelativeUri(Uri uri) instead.")>]
member this.MakeRelative : Uri -> string
[<System.Obsolete("The method has been deprecated. Please use MakeRelativeUri(Uri uri). https://go.microsoft.com/fwlink/?linkid=14202")>]
member this.MakeRelative : Uri -> string
[<System.Obsolete("Uri.MakeRelative has been deprecated. Use MakeRelativeUri(Uri uri).")>]
member this.MakeRelative : Uri -> string
[<System.Obsolete("The method has been deprecated. Please use MakeRelativeUri(Uri uri). http://go.microsoft.com/fwlink/?linkid=14202")>]
member this.MakeRelative : Uri -> string
member this.MakeRelative : Uri -> string
Public Function MakeRelative (toUri As Uri) As String

매개 변수

toUri
Uri

현재 URI와 비교할 URI입니다.

반품

이 URI 인스턴스의 호스트 이름 및 구성표가 동일하면 이 메서드는 현재 URI 인스턴스 toUri 에 추가될 때 매개 변수를 생성하는 String 상대 URI를 나타내는 값을 반환 toUri 합니다.

호스트 이름 또는 스키마가 다른 경우 이 메서드는 매개 변수를 나타내는 값을 String 반환합니다 toUri .

특성

예외

toUrinull입니다.

이 인스턴스는 상대 URI를 나타내며 이 메서드는 절대 URI에 대해서만 유효합니다.

설명

다음 표에서는 URI 인스턴스 toUri및 호출 MakeRelative결과를 보여 줍니다.

현재 URI 인스턴스 toUri 반환 값
http://www.contoso.com/ http://www.contoso.com/test/test.htm test/test.htm
http://www.contoso.com/test1/ http://www.contoso.com/ ../
http://www.contoso.com:8000/ http://www.contoso.com/test/test.htm http://www.contoso.com/test/test.htm
http://username@www.contoso.com/ http://www.contoso.com/test1/test1.txt test1/test1.txt

URI에 있는 경우 사용자 정보는 무시됩니다.

적용 대상