I have one function GetControlRectangle(Rectangle MethodRect) that accepts the rectangle of the control.
Now I write the code like Rectangle rct=dataGridView1.GetCellDisplayRectangle(1,0,false); which finds the location of the cell(1,0) of the datagridview1.
And I pass this rct to the method GetControlRectangle.
Now how to find through the MethodRect(which is the argument in the method)that which function was used to get this rectangle point like GetCellDisplayRectangle() or GetColumnDisplayRectangle(). Because I want to know in the method GetControlRectangle() that this point is for columnheader or cell and it is for cell then for which cell.
In short, I want to know that which function was used through variable which is assigned like Rectangle rct=dataGridView1.GetCellDisplayRectangle(1,0,false); through rct I want to know which function was used to assign this variable.