Consider this example, which uses Replace, Insert, and ToUpper:
public class TestStringsApp
public class TestStringsApp
{
public static void Main(string[] args)
{
string a = "strong"; // Replace all 'o' with 'i'
string b = a.Replace('o', 'i');
Console.WriteLine(b);
string c = b.Insert(3, "engthen"); string d = c.ToUpper();
Console.WriteLine(d);
}
}
The output from this application will be:
string STRENGTHENING
string STRENGTHENING
No comments:
Post a Comment