On Mar 21, 2007, at 08:57 UTC, Markus Winter wrote: > > You could do it with a global method that returned the appropriate > > result as well and then it could NOT be used on the left hand side > of > > an assignment > > That's what I did and it seems to be working well, though as I don't > have access to a PC at the moment I can't say how it works cross > -platform.
It'll work perfectly fine cross-platform (this has nothing to do with platforms). Note that you could also use a global computed property with Get but no Set code. > > Function CR.Get() as String > > static foo as String = Encodings.UTF8.Chr(13) > > return foo > > End Function > > Couldn't you also just say > > Function CR.Get() as String > return Encodings.UTF8.Chr(13) > End Function Yes, but your version is substantially slower than the one that caches the result of Encodings.UTF8.Chr(13) in a static variable. Probably wouldn't matter in real code, but since it's so easy and clear to do it the fast way, why not? Best, - Joe -- Joe Strout -- [EMAIL PROTECTED] Verified Express, LLC "Making the Internet a Better Place" http://www.verex.com/ _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
