How the static class's static method will know the caller?
问题 Imagine I have a static class and a static method inside that. And it has to be accessed by 10 different classes. But how the static class will know who has called it :( It was an interview question....please rephrase it properly and answer me, I am new :( 回答1: I would try the following: public class ParentClass { } public class ChildClass : ParentClass { } public static class StaticClass { public static void SomeMethod(ParentClass d) { var t = d.GetType(); } } public class StaticChildren {