View Single Post
  #2 (permalink)  
Old 09-19-2007, 06:49 AM
ccoonen ccoonen is offline
PT Staff
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 4
Join Date: Jun 2007
Location: Wisconsin
Posts: 317
iTrader: (0)
ccoonen is on a distinguished roadccoonen is on a distinguished roadccoonen is on a distinguished roadccoonen is on a distinguished road
A static method can be directly called from an object... whereas a non-static method must instantiate the object first.

Non-Static:
Dim Chet as New Person("Chet","aaa@bbb.com")
Msgbox(Chet.GetFirstName())

Static:
Msgbox(Chet.GetFirstName()) - No need to instantiate a Person Obj. but remember that your PRivate members that you rely on to "GetFirstName" must also be static... even if it is Private.

Generally if you will build a Utility class that is just all static methods you can directly call that your app or website uses a lot like IsNumeric or IsEmail, etc...
Reply With Quote
The Following User Says Thank You to ccoonen For This Useful Post:
HelloWorld (09-20-2007)