CSharp - Write program to Search text, count characters, get string length

Requirements

You will create a program that

  • displays a number of characters of text,
  • converts the text into uppercase, and
  • checks whether the text contains a specific word.

Hint

C# text behaves like an object.

You can add a dot to text and get its properties and methods.

Demo

using System;

class Program{/*w w  w  . ja  va  2s.  co  m*/
    static void Main(string[] args){
        // Some text to try things on 
        string text = "this is a test test test";

        // What e.g. can be done with texts 
        Console.WriteLine("Original text: " + text);
        Console.WriteLine("Number of characters: " + text.Length);
        Console.WriteLine("In uppercase: " + text.ToUpper());
        Console.WriteLine("Does it contain word \"test\"? " + text.Contains("test"));
    }
}

Result