0
我有工作項ID如何從工作項目ID中知道工作項目類型?
int id =int.Parse(Request.QueryString["ID"],System.Globalization.CultureInfo.CurrentCulture);
WorkItem item= DataManager.DevelopmentProject.Store.GetWorkItem(id);
我有工作項ID如何從工作項目ID中知道工作項目類型?
int id =int.Parse(Request.QueryString["ID"],System.Globalization.CultureInfo.CurrentCulture);
WorkItem item= DataManager.DevelopmentProject.Store.GetWorkItem(id);
我會用:?
var type = item.GetType()
if(type == typeof(Bug))
{
//Do something
}
...
我像這樣解決這個問題
item.Fields["Work Item Type"].Value
它不工作我不能使用GetType()獲得工作項類型, – ferfeit
好吧,請給我們更多的細節。 GetType()獲取對象的類型。有繼承嗎? –
當我運行VAR類型= item.GetType() 在類型有很多領域,但不是關於類型。 – ferfeit