:oops: Trying to play with shapes, but can't get anything to come out. I can do it in a module, but when I try using a class and a module, I get totally lost. This is what I have:
Public Class CSquare
Inherits Object
Private mside As Integer
Public Sub New()
mside = 0
End Sub
Public Sub New(ByVal sideValue As Integer)
mside = sideValue
End Sub
Public Function ToSquare() As String
Dim mrow As Integer = 1
Dim mcolumn As Integer
Dim myChar As Char
If mside <= 20 Then
While mrow <= mside
mcolumn = 1
While mcolumn <= mside
Return Console.WriteLine("*")
mcolumn += 1
End While
Console.WriteLine()
mrow += 1
End While
Else
Return Console.WriteLine("Num you entered is too big")
End If
End Function
End Class
Module Module1
Sub Main()
Dim myNum As Integer
Console.WriteLine("Enter a number less than 20")
myNum = Console.ReadLine()
Dim side As New CSquare(myNum)
'Dim row As Integer = 1
'Dim column As Integer
Console.WriteLine(side.ToSquare)
End Sub
End Module