What is a simple Noop statement in C#, that doesn\'t require implementing a method? (Inline/Lambda methods are OK, though.)
My current use case: I want to occupy the c
If you want to break into the method you could hardcode a breakpoint:
System.Diagnostics.Debugger.Break();
Alternatively if you don't compile in release mode, the following line will emit IL which you can break on:
var a = 1;
You could also write a Debug.Break() that is specific to your machine:
[Conditional("DEBUG")]
[Obsolete("Please remove me before checkin.")]
public static void Break()
{
#IF DEBUG
if (Dns.GetHostName() == "PROTECTORONE")
Debugger.Break();
#ENDIF
}
Note that because of [Conditional("DEBUG")]
that method will not get called in call sites during a RELEASE build.