Assuming you already have a connection object established in the .NET API, try this:
string[] files = new string[1];
files[0] = "//depot/Jam/MAIN/src/glob.c";
P4Command cmd = new P4Command(pRep, "where", true, files);
Options opts = new Options();
//run command and get results
P4CommandResult results = cmd.Run(opts);
TaggedObjectList list = (results.TaggedOutput);
foreach (TaggedObject obj in list)
{
foreach (String s in obj.Keys)
{
String value = "n/a";
obj.TryGetValue(s, out value);
Console.Out.WriteLine(s + " = " + value);
}
}
That gives you output like this:
depotFile = //depot/Jam/MAIN/src/glob.c
clientFile = //bruno_ws/Jam/MAIN/src/glob.c
path = C:\P4DemoWorkspaces\bruno_ws\Jam\MAIN\src\glob.c