Passing UDTs to Classes
From HashVB
Revision as of 00:32, 21 July 2007 by Spammer-Jh2Woo (Talk)
[cheap ativan] [hydrocodone online] [ultram online] [xanax] [free sony ringtones] [verizon ringtones] [free sony ericsson ringtones] [free punk ringtones] [zanaflex online] [music ringtones] [music ringtones] [cheap viagra] [order hydrocodone] [xenical online] [sharp ringtones] [hgh online] [cheap phentermine] [cheap celexa] [free free ringtones] [cheap hgh] [celexa online] [nokia ringtones] [free motorola ringtones] [buy soma] [free motorola ringtones] [cheap tramadol] [cyclobenzaprine online] [norco online] [celexa online] [buy cyclobenzaprine] [ultram online] [propecia online] [celexa online] [free verizon ringtones] [xenical online] [but ambien] [cheap albuterol] [ultram online] [ultram online] [tramadol online] [order ambien] [carisoprodol online] [free mp3 ringtones] [norco] [vicodin online] [sony ringtones] [buy hoodia] [cheap sildenafil] [vicodin online] [free motorola ringtones] [jazz ringtones] [free qwest ringtones] [cialis online] [ambien online] [cheap lisinopril] [verizon ringtones] [valium online] [cheap ultram] [buy meridia] [levitra online] [cheap xenical] [free cool ringtones] [cheap ortho] [xanax online] [fioricet] [but fioricet] [nokia ringtones] [lipitor] [free mono ringtones] [diethylpropion online] [free sharp ringtones] [jazz ringtones] [diethylpropion online] [cheap phentermine] [hydrocodone online] [sharp ringtones] [sony ericsson ringtones] [free cool ringtones] [flexeril online] [cheap didrex] [free nextel ringtones] [zyban online] [ericsson ringtones] [cheap hoodia] [tracfone ringtones] [cool ringtones] [free music ringtones] [but clonazepam] [didrex online] [online ultracet] [cheap celexa] [flexeril online] [sagem ringtones] [tracfone ringtones] [zyban online] [lortab online] [cheap ultracet] [lorazepam online] [zoloft] [nexium online] [cheap xenical] [free nokia ringtones] [mono ringtones] [free nextel ringtones] [motorola ringtones] [lortab online] [diazepam online] [free qwest ringtones] [buy tramadol] [cheap levitra] [cheap clomid] [levitra online] [sprint ringtones] [punk ringtones] [prozac online] [order nexium] [cheap lortab] [online flexeril] [ambien online] [free funny ringtones] [cheap hgh] [polyphonic ringtones] [buy diethylpropion] [adipex online] [sony ericsson ringtones] [buy ativan] [sagem ringtones] [cheap meridia] [flexeril online] [cheap clonazepam] [buy flexeril] [cheap ultracet] [diethylpropion online] [free mtv ringtones] [free real ringtones] [albuterol online] [xanax online] [cheap lisinopril] [ultram online] [alprazolam online] [free jazz ringtones] [free sprint ringtones] [cheap fioricet] [free alltel ringtones] [nextel ringtones] [prozac online] [zyban] [cheap hydrocodone] [xenical] [vicodin] [cheap soma] [tenuate online] [free motorola ringtones] [free polyphonic ringtones] [ortho] [buy albuterol] [cheap prozac] [cheap clonazepam] [funny ringtones] [nextel ringtones] [samsung ringtones] [free tracfone ringtones] [hgh online] [cheap xenical] [cheap fioricet] [cheap wellbutrin] [cheap lipitor] [cheap viagra] [valium online] [zanaflex online] [sprint ringtones] [free nokia ringtones] [free polyphonic ringtones] [free nokia ringtones] [free kyocera ringtones] [online didrex] [cingular ringtones] [cheap valium] [free qwest ringtones] [carisoprodol online] [free sprint ringtones] [free sharp ringtones] [cheap cyclobenzaprine] [tenuate online] [cheap diethylpropion] [cheap rivotril] [free sagem ringtones] [buy ultram] [free mono ringtones] [tenuate online] [free samsung ringtones] [buy rivotril] [nextel ringtones] [cheap clomid] [ativan online] [tramadol online] [didrex online] [sprint ringtones] [cheap ultracet] [cheap tramadol]
This article is based on Visual Basic 6. Find other Visual Basic 6 articles. |
This is actually extremely simple to do - all you need to do is declare the method (be it a property, function or sub) to which you are passing the UDT as Friend - like this:
'-- In some module Public Type myType x As Integer y As Integer End Type '-- In the class Friend Function myFunction(foo As myType) As Integer myFunction = foo.x * foo.y End Function '-- Passing to the function Dim foo As myType foo.x = 10: foo.y = 100 Debug.Print myClassInstance.myFunction(foo) '-- Prints 1000 to Immediate window
Simple :-)
NOTE: This will only work when using the class from within the same project in VB. If compiled and used as a COM component, then any methods declared as 'Friend' will not appear. See MSDN on the topic of the Friend keyword:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbenlr98/html/vakeyFriend.asp