using System;
class Sample
{
public static void 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);
}
}