I think I have a fair grip on OOP, but this part of VB.NET has me a bit confused:
What confuses me is the datetime method call. My can I use a method of this class, when I havn't created the object yet? Is this an object that is made available to me my the .NET framework somehow? The page somehow makes this object availabe to me, just like the response object? I looked in MSDN, and they don't even call this a class, but rather a structure, but it still has methods.
Does anyone have any insight into this? Any pointers? Links?
I mean, I wouldn't do this:
Code:
sub Page_Load(sender As Object, e As EventArgs)
dim maxDaysNewMonth as integer = datetime.DaysInMonth(1996, 2)
response.write(maxDaysNewMonth)
end sub
What confuses me is the datetime method call. My can I use a method of this class, when I havn't created the object yet? Is this an object that is made available to me my the .NET framework somehow? The page somehow makes this object availabe to me, just like the response object? I looked in MSDN, and they don't even call this a class, but rather a structure, but it still has methods.
Does anyone have any insight into this? Any pointers? Links?
I mean, I wouldn't do this:
Code:
dim intStringLength = String("Steve").Length