terrafx / terrafx.interop.windows

Interop bindings for Windows.
MIT License
260 stars 31 forks source link

Update Win32Application.cs #386

Closed DeafMan1983 closed 10 months ago

DeafMan1983 commented 10 months ago

Shouldn't default: because I have tested since I clicked Titlebar than maximized and unmaximized without default: cause It crashed since you wrote default: { ... }

It fixed without default: It works as well under Windows 10 ( latest build version )

Proof: I have tested with debug and release without default: { ... } = Works fine 100 %.

Thank you for accepting my solution!

tannergooding commented 10 months ago

There's no difference between the two pieces of code. default: { } is simply the case that is executed if no other entry is matched and if no default exists, then it executes the next statement following the switch block.

It only comes down to stylistic preference, and personally I prefer having it as part of the switch to make it clear that every case returns and there is no additional code that will execute.

DeafMan1983 commented 10 months ago

Ok thanks for understanding!