using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public static class ExtensionLibExtensions
{
public static string ReverseString(this string inputString)
{
return new string(inputString.ToCharArray().Reverse().ToArray());
}
}
class Program
{
static void Main(string[] args)
{
string sourceString = "this is a test";
Console.WriteLine("String backwards: {0}", sourceString.ReverseString());
}
}
|