If I understand your question directly, this is not possible to do in code. The only way to do this is with static analysis of the code.
Resharper has this ability - To find out where a particular class/method/property is used, you can right click on the declaration and select "Find Usages". This is a very handy feature :)
But that only works of the code calling your method is known (in the same solution). It wont work when third parties consume your library.
What exactly are you trying to achieve here? If your method needs to identify callers, you should add this as a requirement (ie add a parameter containing the caller identity).
public void MyMethod()
{
// I need name of caller project, but how?
}
public void MyMethod(String callerProject)
{
// People who call this method know the name of their own project :)
}