Skip to sidebar Skip to content
Ipercube Technical
Jack of all trades, master of none
Date: Time: - Stardate:
Welcome, Log in by clicking  Here!
SS64
MDN
Stack
Code
GitHub
Wiki
Convert
V Studio
  • Home
  • VB Functions
    • Access Functions
    • Assembly Info
    • Color/Image Functions
    • Data Table Functions
    • Email Functions
    • Active Directory Functions
    • LDAP Functions
    • Excel Functions
    • Logging Functions
    • Source Code Retrieval
    • String Functions
    • Sql Functions
    • Object Utilities Functions
    • System and Utilities
    • Utility Forms
  • VB Classes
    • Environment Variables Helper
  • ABAP
    • ABAP Reports
    • ABAP HTTP Functions
Ipercube Technical
  • Home
  • VB Functions
    • Access Functions
    • Assembly Info
    • Color/Image Functions
    • Data Table Functions
    • Email Functions
    • Active Directory Functions
    • LDAP Functions
    • Excel Functions
    • Logging Functions
    • Source Code Retrieval
    • String Functions
    • Sql Functions
    • Object Utilities Functions
    • System and Utilities
    • Utility Forms
  • VB Classes
    • Environment Variables Helper
  • ABAP
    • ABAP Reports
    • ABAP HTTP Functions

Is Method Exists

Checks whether a method with the specified name exists in the given object.

  • Returns False if containingObject is Nothing or if methodName is null or empty.
  • Uses reflection to check both public and non-public, instance and static methods.
  • Returns True if a method with the exact name is found; otherwise, False.
VB
    Public Function IsMethodExists(containingObject As Object, methodName As String) As Boolean
    
        If containingObject Is Nothing OrElse String.IsNullOrEmpty(methodName) Then Return False
        
        Dim type As Type = containingObject.GetType()
        Dim method As MethodInfo = type.GetMethod(methodName, 
                                                  BindingFlags.Public Or 
                                                  BindingFlags.NonPublic Or 
                                                  BindingFlags.Instance Or 
                                                  BindingFlags.Static)                                                
        Return method IsNot Nothing
    End Function
Posted by ipercube


© 2026 Ipercube Design