fork download
  1. Imports System
  2.  
  3. Public Class Test
  4. Public Shared Sub Main()
  5. Dim tab(0) As Label
  6. tab(0) = New Label
  7.  
  8. Console.WriteLine("Avant modification : tab(0).Margin.Left = {0}", tab(0).Margin.Left)
  9. tab(0).Margin.Left = 42
  10. Console.WriteLine("Après modification : tab(0).Margin.Left = {0}", tab(0).Margin.Left)
  11. End Sub
  12. End Class
  13.  
  14. Public Class Label
  15. Private _margin As Padding
  16. Public Property Margin As Padding
  17. Get
  18. Return _margin
  19. End Get
  20. Set (ByVal value As Padding)
  21. _margin = value
  22. End Set
  23. End Property
  24. End Class
  25.  
  26. Public Structure Padding
  27. Private _left As Integer
  28. Public Property Left As Integer
  29. Get
  30. Return _left
  31. End Get
  32. Set (ByVal value As Integer)
  33. _left = value
  34. End Set
  35. End Property
  36. End Structure
stdin
Standard input is empty
compilation info
Visual Basic.Net Compiler version 0.0.0.5914 (Mono 2.4.2 - r)
Copyright (C) 2004-2008 Rolf Bjarne Kvinge. All rights reserved.


Assembly 'prog, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' saved successfully to '/home/IoaW8l/prog.exe'.
Compilation successful
Compilation took 00:00:01.1011970
stdout
Avant modification : tab(0).Margin.Left = 0
Après modification : tab(0).Margin.Left = 0