C# String Tutorial
class Program{
static void Main(string[] args)
{
String str;
Console.Write("Enter your string>> ");
str = Console.ReadLine();
Console.WriteLine("HI " + str);
Console.WriteLine("Length=" + str.Length);
Console.WriteLine("Lower Case\t" + str.ToLower());
Console.WriteLine("Uppercase\t" + str.ToUpper());
Console.WriteLine("Trime text\t", str.Trim());
Console.WriteLine("word amit is apear on " + str.IndexOf("amit"));
}
}
No comments:
Post a Comment