A normal class needds to go through the instantiation process every time it's used and contains instance specific information.
i.e.
public class MyClass
private FirstName as string
private LastName as string
public sub SetFirstName(x as string)
FirstName = x
End sub
public sub SetLastName(x as string)
LastName = x
End sub
public function GetName as string
return FirstName & " " & LastName
end function
'etc.
end class
'example of using it
'causes instantiation etc
dim x as new MyClass
'multiple calls often used when dealing with class
x.SetFirstName("Blah")
x.SetLastName("Smith")
Label1.Text = x.GetName()
'class memory released sometime later
which is fine if a class needs to remember information between calls and behave in a stateful way. (Often the case in a windows app, or if the object is being stored in a Session for example)
if you simply want to make a module like function call and avoid the state management etc. then something like the following would work.
public class MyClass
'note no private vars etc.
'shared function
public Shared function FullName (fName as string, lName as string) as string
return fName & " " & lName
end function
end class
'usage
Label1.Text = MyClass.FullName ("Blah","Smith") 'never instantiated etc.
each however have their own strengths and weaknesses - but they can be combined in a single class.
This is used a lot throughout the .Net framework (Math.Sqrt - Math is the class, MessageBox.Show - MessageBox is the class)