[dba-VB] VB.Net - cut and trim

JWColby jwcolby at colbyconsulting.com
Wed May 9 20:16:44 CDT 2007


OK, I understand.  I always thought of the methods as just returning a
value, but in .Net even variables are objects which have methods.  Makes
perfect sense.  Thanks for stating it that way though, else I would have
spent the next few years with a complete misconception of what was really
happening. 


John W. Colby
Colby Consulting
www.ColbyConsulting.com

-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust
Sent: Wednesday, May 09, 2007 7:21 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] VB.Net - cut and trim

You aren't exactly stacking methods, John, more like stacking objects.
Each method involved is returning an object and that object shares in the
methods of its class.  So if you use substring, the result is a string
object, and you then call the trim method of that object.

Charlotte Foust 

-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby
Sent: Wednesday, May 09, 2007 2:58 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] VB.Net - cut and trim

It is interesting that you can stack methods like that.  Substring and trim
are both methods of the string object.  This implies that the methods are
processed left to right and the result of the left is passed into the right.

John W. Colby
Colby Consulting
www.ColbyConsulting.com




More information about the dba-VB mailing list