2012-12-29 45 views

回答

0
public string GetClassName(object item) 
{ 
    return typeof(item).Name; 
} 
+1

顯然這不會編譯。 – horgh

0

嘗試以下操作:

this.GetType().Name 

Type.Name - >獲取當前成員的名稱。