2017-08-15 188 views

回答

5

你可以從check the API documentation,從那裏你可以看到.NET Core 1.0和更新的版本,NetStandard 1.0和更新的版本都支持Debug.Assert(bool)

如果它不適合你,你可能需要在你的項目中包含NuGet軟件包System.Diagnostics.Debug以顯示它。

+0

謝謝斯科特。我是.net核心新手,剛剛導入了「Using System.Diagnostics.Debug」,並直接調用Assert()。我將其更改爲「使用System.Diagnostics;」然後使用「Debug.Assert()」進行調用 – Anish