C# Script for Obtaining Information with ResolvePath and GetContents on Vmware ESX

string path = "/vm";
string handle = vma_.ResolvePath(path);
ViewContents contentsXML = vma_.GetContents(handle);
Container objContainer = (Container) contentsXML.body;