private void GetNumberOfSubstrings()
        {
            var client = new SubstringServiceClient();

            var text = this.TextBox.Text;
            var substring = this.SubStringTextBox.Text;
            this.ResultLabel.Text = "Number of substrings: " + client.GetNumberOfSubstrings(text, substring);
        }
Exemple #2
0
        private void GetNumberOfSubstrings()
        {
            var client = new SubstringServiceClient();

            var text      = this.TextBox.Text;
            var substring = this.SubStringTextBox.Text;

            this.ResultLabel.Text = "Number of substrings: " + client.GetNumberOfSubstrings(text, substring);
        }
 static void Main(string[] args)
 {
     SubstringServiceClient client = new SubstringServiceClient();
     using (client)
     {
         var result = client.GetOccurrencesCount("goshko", "goshko e pich, goshko ne e pich");
         Console.WriteLine(result);
     }
 }
        static void Main(string[] args)
        {
            SubstringServiceClient client = new SubstringServiceClient();

            using (client)
            {
                var result = client.GetOccurrencesCount("goshko", "goshko e pich, goshko ne e pich");
                Console.WriteLine(result);
            }
        }
        private static void GetNumberOfSubstrings()
        {
            var client = new SubstringServiceClient();

            string text = "alalal";
            string substring = "al";
            int numberOfSubstrings = client.GetNumberOfSubstrings(text, substring);
            Console.WriteLine("Text: {0} | Substring: {1} -> number of substrings: {2}",
                text, substring, numberOfSubstrings);
        }
        private static void GetNumberOfSubstrings()
        {
            var client = new SubstringServiceClient();

            string text               = "alalal";
            string substring          = "al";
            int    numberOfSubstrings = client.GetNumberOfSubstrings(text, substring);

            Console.WriteLine("Text: {0} | Substring: {1} -> number of substrings: {2}",
                              text, substring, numberOfSubstrings);
        }