我是C#的新手,我在調用Main()方法中的函數時遇到了一些問題。 class Program
{
static void Main(string[] args)
{
test();
}
public void test()
{
MethodInfo mi = this.GetType().GetMethod("test
我碰到這種行爲在今天早些時候,並希望有人能夠解釋爲什麼發生這種情況: class Object
def some_method
end
end
Object.respond_to?(:some_method) # => true
當然,這並不與其他類發生: class Dog
def some_other_method
end
end
Dog