ApiInformation.IsMethodPresent 메서드

정의

오버로드

IsMethodPresent(String, String)

지정된 형식에 대해 지정된 메서드가 있는지 여부를 나타내는 true 또는 false를 반환합니다.

IsMethodPresent(String, String, UInt32)

지정된 수의 입력 매개 변수가 있는 지정된 메서드 오버로드가 지정된 형식에 대해 있는지 여부를 나타내는 true 또는 false를 반환합니다.

IsMethodPresent(String, String)

지정된 형식에 대해 지정된 메서드가 있는지 여부를 나타내는 true 또는 false를 반환합니다.

public:
 static bool IsMethodPresent(Platform::String ^ typeName, Platform::String ^ methodName);
/// [Windows.Foundation.Metadata.Overload("IsMethodPresent")]
 static bool IsMethodPresent(winrt::hstring const& typeName, winrt::hstring const& methodName);
[Windows.Foundation.Metadata.Overload("IsMethodPresent")]
public static bool IsMethodPresent(string typeName, string methodName);
function isMethodPresent(typeName, methodName)
Public Shared Function IsMethodPresent (typeName As String, methodName As String) As Boolean

매개 변수

typeName
String

Platform::String

winrt::hstring

형식의 네임스페이스 정규화된 이름입니다.

methodName
String

Platform::String

winrt::hstring

메서드의 이름입니다.

반환

Boolean

bool

True 이면 형식에 대해 지정된 메서드가 있습니다. 그렇지 않으면 false입니다.

특성

예제

if (Windows.Foundation.Metadata.ApiInformation.IsMethodPresent("Windows.Networking.Sockets.StreamSocket", "CancelIOAsync"))
{
    Debug.WriteLine("Windows.Networking.Sockets.StreamSocket.CancelIOAsync method found");
}
else
{
    Debug.WriteLine("Windows.Networking.Sockets.StreamSocket.CancelIOAsync method NOT found");
}

추가 정보

적용 대상

IsMethodPresent(String, String, UInt32)

지정된 수의 입력 매개 변수가 있는 지정된 메서드 오버로드가 지정된 형식에 대해 있는지 여부를 나타내는 true 또는 false를 반환합니다.

public:
 static bool IsMethodPresent(Platform::String ^ typeName, Platform::String ^ methodName, unsigned int inputParameterCount);
/// [Windows.Foundation.Metadata.Overload("IsMethodPresentWithArity")]
 static bool IsMethodPresent(winrt::hstring const& typeName, winrt::hstring const& methodName, uint32_t const& inputParameterCount);
[Windows.Foundation.Metadata.Overload("IsMethodPresentWithArity")]
public static bool IsMethodPresent(string typeName, string methodName, uint inputParameterCount);
function isMethodPresent(typeName, methodName, inputParameterCount)
Public Shared Function IsMethodPresent (typeName As String, methodName As String, inputParameterCount As UInteger) As Boolean

매개 변수

typeName
String

Platform::String

winrt::hstring

형식의 네임스페이스 정규화된 이름입니다.

methodName
String

Platform::String

winrt::hstring

메서드의 이름입니다.

inputParameterCount
UInt32

unsigned int

uint32_t

오버로드에 대한 입력 매개 변수 수입니다.

반환

Boolean

bool

True 이면 형식에 대해 지정된 메서드가 있습니다. 그렇지 않으면 false입니다.

특성

예제

if (Windows.Foundation.Metadata.ApiInformation.IsMethodPresent("Windows.Globalization.PhoneNumberFormatting.PhoneNumberFormatter", "Format", 2))
{
    Debug.WriteLine("Windows.Globalization.PhoneNumberFormatting.PhoneNumberFormatter.Format overload that takes 2 parameters was found");
}
else
{
    Debug.WriteLine("Windows.Globalization.PhoneNumberFormatting.PhoneNumberFormatter.Format overload that takes 2 parameters was NOT found");
}

추가 정보

적용 대상