fork download
  1. public Size ClientSize {
  2. get {
  3. return new Size(clientWidth, clientHeight);
  4. }
  5.  
  6. set {
  7. SetClientSizeCore(value.Width, value.Height);
  8. }
  9. }
  10.  
  11. protected virtual void SetClientSizeCore(int x, int y) {
  12. Size = SizeFromClientSize(x, y);
  13. clientWidth = x;
  14. clientHeight = y;
  15. OnClientSizeChanged(EventArgs.Empty);
  16. }
  17.  
  18. internal Size SizeFromClientSize(int width, int height) {
  19. NativeMethods.RECT rect = new NativeMethods.RECT(0, 0, width, height);
  20. CreateParams cp = CreateParams;
  21. SafeNativeMethods.AdjustWindowRectEx(ref rect, cp.Style, HasMenu, cp.ExStyle);
  22. return rect.Size;
  23. }
  24.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(1,11): error CS1525: Unexpected symbol `Size', expecting `class', `delegate', `enum', `interface', `partial', or `struct'
prog.cs(3,20): error CS1530: Keyword `new' is not allowed on namespace elements
prog.cs(3,23): error CS1525: Unexpected symbol `Size', expecting `class', `delegate', `enum', `interface', `partial', or `struct'
prog.cs(11,22): error CS1525: Unexpected symbol `void', expecting `class', `delegate', `enum', `interface', `partial', or `struct'
prog.cs(18,13): error CS1525: Unexpected symbol `Size', expecting `class', `delegate', `enum', `interface', `partial', or `struct'
prog.cs(19,35): error CS1530: Keyword `new' is not allowed on namespace elements
prog.cs(19,38): error CS1525: Unexpected symbol `NativeMethods', expecting `class', `delegate', `enum', `interface', `partial', or `struct'
Compilation failed: 7 error(s), 0 warnings
stdout
Standard output is empty