AutoIt is available with c#, libs can be found here :
https://www.autoitscript.com/site/autoit/downloads/
for example to get the value of the calc app you can do this :
AutoItX.WinWait("[CLASS:CalcFrame]", "", 10);
var win = AutoItX.WinGetHandle("[CLASS:CalcFrame]");
string strReturnText = AutoItX.WinGetText(win).Trim();
If you don't want to use autoit you can use PInvoke.
you can get a handle of the calc window with Pinvoke like this :
[DllImport("USER32.DLL", CharSet = CharSet.Unicode)]
public static extern IntPtr FindWindow(string lpClassName,
string lpWindowName);
IntPtr handle = FindWindow("CalcFrame", "Calculator");
etc...
To see a more complex example you can read my answer here to get tabs inside internet explorer.
https://stackoverflow.com/a/37595421/5703316
More info about Pinvoke :
http://pinvoke.net/
EDIT
After some thinking I think the best way for you is to use System.Windows.Automation;
I did a little example to show you how to use the Automation framework.
It's a console application that gets the grid headers of this little windowsForm app :

And the code :
static void Main(string[] args)
{
int id = System.Diagnostics.Process.GetProcessesByName("WindowsFormsApplication1")[0].Id;
AutomationElement desktop = AutomationElement.RootElement;
AutomationElement bw = desktop.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.ProcessIdProperty, id));
AutomationElement datagrid = bw.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.AutomationIdProperty, "dataGridView1"));
AutomationElementCollection headers = datagrid.FindAll(TreeScope.Descendants, new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Header));
var headerCol1 = headers[1].Current.Name; ;
var headerCol2 = headers[2].Current.Name;
Console.WriteLine(headerCol1 + " " + headerCol2);
}
You can find many Q/A on SO to manipulate DataGridView with UI Automation :
Getting full contents of a Datagrid using UIAutomation
UI Automation not working for DataGridView