How would I convert this command line (from a .bat) into something I could use in C#?

dsquery user forestroot -samid "%%d" | dsget user -display -upn  -office -tel -mobile -dept | FIND /V "dsget"
I am not familiar with bat scripting in the slightest, the above does what I want it to but I really don't understand what keywords in the command do what......if possible though I do need to get that working in c#, so what c# functionality would I want to look for and are there any tutorials on using it? I know there is a DSQuery function in c#, I just can't find very good examples on its usage.