Is there a way to dynamically read web service methods using a program? I have a Windows Forms application that should be able to read a list of methods and display them. I added a service link for my project, but you need help reading a list of web methods or operations (WCFs).
Answer:
Here is a snippet of code just in case someone is looking for it.
MethodInfo[] methods = typeof(MyClass).GetMethods(BindingFlags.Public | BindingFlags.Instance); if (methods != null && methods.Length > 0) { foreach (MethodInfo m in methods) { foreach (object o in m.GetCustomAttributes(false)) {
source share