Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.net core: Is Assert supported with C# on .net Core

Tags:

c#

.net-core

Do we have System.Diagnostics.Debug.Assert() support in .net core with C#? Is there a alternative for this based on .net core?

like image 885
Anish Avatar asked Aug 15 '17 04:08

Anish


1 Answers

You can check the API documentation, from there you can see both .NET Core 1.0 and newer and NetStandard 1.0 and newer both support Debug.Assert(bool).

If it is not working for you, you might need to include the NuGet package System.Diagnostics.Debug in your project for it to show up.

like image 151
Scott Chamberlain Avatar answered Nov 02 '22 15:11

Scott Chamberlain