string thing = "etc";
thing = thing.GetName();
//now thing == "thing"
public static string GetName(this object obj)
return ... POOF! //should == "thing"
No. At the point you're using it, the "name" would be "obj" - This could be retrieved (with debugging symbols in place) via MethodBase.GetCurrentMethod().GetParameters().Name.
However, you can't retrieve the variable name from the calling method.