得到方法/函数名
class   A 
 { 
          string   getfiled1(){ 
                   returin    "hello " 
          } 
 }   
 class   b 
 { 
          void   main(string[]   args){ 
                   A   a   =   new   A(); 
                   Console.write(a.getfiled1()); 
          } 
 }   
 以上代码会输出“hello”,而我想得到 "getfiled1 ",也就是调用的方法名称。 
 请教各位了!   
 我想写的是一个免配置的DB访问组件,在设置查询时出了问题   
 如下:   
 我需要生成以下SQL:   
 select   *   from   tb1   where   name   =    '123 '   
 我需要要代码中这样写   
 tb1.condition.set(getMethodName(tb1.getname()), "123 ");   
 注意:我要在getMethodName返回“getname”   
 请问大家有什么思路。   
 原贴:http://community.csdn.net/Expert/topic/5245/5245869.xml?temp=.124447   
 我对该贴的解答并不是很满意,请大侠们关注
------解决方案--------------------帮顶
------解决方案--------------------用反射.
------解决方案--------------------给类A,写一个带参数的构造函数。用参数传你要的getname.
------解决方案--------------------MethodInfo.Invoke
------解决方案--------------------up
------解决方案--------------------楼主思维混乱
------解决方案--------------------a.GetType().GetMethods()[0].Name 
------解决方案--------------------反射
------解决方案--------------------帮顶