Replaces the name of each environment variable embedded in string
using System;
class Sample
{
publicstaticvoid Main()
{
String str;
String query = "My system drive is %SystemDrive% and my system root is %SystemRoot%";
str = Environment.ExpandEnvironmentVariables(query);
Console.WriteLine("ExpandEnvironmentVariables:{1}", str);
}
}