using System;
namespace Example45A
{
///
/// Summary description for Class1.
///
class Class1
{
///
/// The main entry point for the application.
///
[STAThread]
static void Main(string[] args)
{
String s = " C# lets us use objects. ";
Console.WriteLine(s);
Console.WriteLine("s.Length= " + s.Length);
Console.WriteLine(s.ToLower());
Console.WriteLine(s.ToUpper());
Console.WriteLine(s.Trim());
String t = s.Trim();
Console.WriteLine("t.Length=" + t.Length);
Console.WriteLine("s.SubString(2,5)= " + s.Substring(2,5));
Console.WriteLine("s.IndexOf('#')= " + s.IndexOf('#'));
Console.WriteLine("s.IndexOf(\"lets\") = " + s.IndexOf("lets"));
Console.WriteLine("s.Replace(\"us\") = " + s.Replace("us", "them"));
double d = 3.14159265;
String w = String.Format("The price is {0:C}", d);
Console.WriteLine(w);
}
}
}