How to get all methods from WCF service?

.net, c#, silverlight, silverlight-3.0, wcf

Solution

Given the type of the service class you could use the GetMethods function to get a list of all the methods through reflection:

MethodInfo[] methods = typeof(TypeOfTheService).GetMethods();
foreach (var method in methods)
{
    string methodName = method.Name;
}

Problem

How to get list of all methods from WCF silverlight enabled service from code. I already have added service reference to Silverlight application. Can I get all methods using Reflection? If can please provide me example.

Original source