0

I would really like to know is there any real advantage of using conditional attriubtes over #if and #endif. For me, using anyone is same apart from the syntax difference.

[Conditional("DEBUG")]
public void CheckState()
{

}

I found a similar link but does not give much information.

C# !Conditional attribute?.

Also, read in a book (dont want to mention book name) conditional attribute generates more efficient IL code a and hence it should be used. But i couldn't get enough proof of this statement or example.

Thanks

Community
  • 1
  • 1
sia
  • 1,872
  • 1
  • 23
  • 54

0 Answers0