Look at your code:
Dim x As ClassLibrary1.Class1 // creating object
...
Label1.Text = x.time() //calling the value and print in lablel
That doesn't "creating object" - it allocates a variable called "x" that
can refer to an object. It doesn't create any object and assign the value to "x", it creates x and assigns
Nothing
to it.
Probably, what you want to say is:
Dim x As New ClassLibrary1.Class1 // creating object