.NET's Process class has a property CreateNoWindow
.
ProcessStartInfo.CreateNoWindow Property
Gets or sets a value indicating whether to start the process in a new window.
To me, that seems a queer choice of name for the property. The default is CreateNoWindow = false
, a momentarily-confusing double negative.
Is there a reason the property is named as it is? Why not CreateWindow
(with the opposite meaning)? Is there a rule that boolean properties must default to false?
I'd guess that it is simply a very literal reflection of the underlying Win32 process creation flag named CREATE_NO_WINDOW
.
Only the author of the .net class can explain why the choice was made to reflect the Win32 convention onto the .net class. It could easily have been done the other way. If I had to guess, I'd suggest that the choice was made to make it very clear that the property maps directly onto CREATE_NO_WINDOW
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With