fork download
  1. Imports System
  2.  
  3. Public Class Test
  4. Private length As Double
  5. Private width As Double
  6.  
  7. 'Public methods
  8. Public Sub AcceptDetails()
  9. length = 4.5
  10. width = 3.5
  11. End Sub
  12.  
  13. Public Function GetArea() As Double
  14. GetArea = length * width
  15. End Function
  16. Public Sub Display()
  17. Console.WriteLine("Length: {0}", length)
  18. Console.WriteLine("Width: {0}", width)
  19. Console.WriteLine("Area: {0}", GetArea())
  20.  
  21. End Sub
  22.  
  23. Shared Sub Main()
  24. Dim r As New Rectangle()
  25. r.Acceptdetails()
  26. r.Display()
  27. Console.ReadLine()
  28. End Sub
  29. End Class
Compilation error #stdin compilation error #stdout 0.03s 24160KB
stdin
Standard input is empty
compilation info
Visual Basic.Net Compiler version 0.0.0.5943 (Mono 3.8 - tarball)
Copyright (C) 2004-2010 Rolf Bjarne Kvinge. All rights reserved.

/home/EyoWNC/prog.vb (24,31) : error VBNC30451: 'Rectangle' is not declared. It may be inaccessible due to its protection level.
There were 1 errors and 0 warnings.
Compilation took 00:00:00.7328600
stdout
Standard output is empty