program to demonstrate concept of simple class
to convert lowercase text to uppercase.
-----------------------------------------code---------------------------------------------------------
-----------------------------------------output----------------------------------------------------
-----------------------------------------code---------------------------------------------------------
Public Class Form1
Public Class convertpostcode
Public Function doconvert(ByVal
postcode As String)
As String
Dim
convertpostcode As String
convertpostcode = StrConv(postcode,
VbStrConv.Uppercase)
doconvert = convertpostcode
End Function
End Class
Private Sub Button1_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim
newcode As String
Dim obj
As New
convertpostcode
newcode = obj.doconvert(TextBox1.Text)
TextBox2.Text = newcode
End Sub
End Class
End Module-----------------------------------------output----------------------------------------------------
codestrew |
No comments:
Post a Comment