static void Main() { ServiceLibraryClient serviceLibrary = new ServiceLibraryClient(); Console.WriteLine(serviceLibrary.GetCountSecondContainsFirst("the", "The man who was on the top of his house was the is the winner of the dota 2 championship for the second time")); serviceLibrary.Close(); }
static void Main(string[] args) { // With svcutil http://localhost:54589/ServiceLibrary.svc command in the VS command prompt // I generated the ServiceLibrary.cs and output.config file which has to be renamed to App.config. // I added references to System.ServiceModel and System.Runtime.Serialization. ServiceLibraryClient client = new ServiceLibraryClient(); Console.WriteLine(client.GetNumberOfOccurences("ten", "tennis-tennis-tennis")); // outputs 3 because "ten" is copntained 3 times in the second string client.Close(); }