我目前正在讀的書Professional Enterprise .NET而且我發現在一些示例程序的這樣的警告:NUnit.Framework.Assert.IsInstanceOfType()是過時
'NUnit.Framework.Assert.IsInstanceOfType(System.Type, object)' is obsolete
現在我可能已經回答了我的自己的問題,但是,修復這個警告是簡單的用Assert.IsInstanceOf()替換Assert.IsInstanceOfType()的情況?例如這樣的:
Assert.IsInstanceOfType(typeof(ClassName), variableName);
將成爲:
Assert.IsInstanceOf(typeof(ClassName), variableName);
這是更清潔的語法,感謝馬克! – Malice 2010-04-17 13:15:16