简体   繁体   中英

System.Debug and System.Threading Reference Error

Error Message 'ThreadState' is an ambiguous reference between 'System.Threading.ThreadState' and 'System.Diagnostics.ThreadState'

I am trying to debug C# Class .cs and am using Debug.Writeline for code debugging...

But am getting an error above!!

Is there another way to debug C# Code Classes ? I tried Console.Writeline() and Alert.Show and Message.Show and have not found another effective way to debug web application C# classes or way around the ambiguous reference !!

使用有问题的枚举的完全限定名称,或者根本不using System.Diagnostics System.Diagnostics.Debug.WriteLine()而是完全限定System.Diagnostics.Debug.WriteLine()调用)。

You can solve this by doing as follows. Put this using statement near all your other using statements:

using TheThreadState = System.Threading.ThreadState;

Now use TheThreadState on you code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM