Question about automatically generated VB code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm looking at the code in the designer.vb file of an XSD. Every table has
at least one 'Overridable Function Fill' function. I'm a little confused. I
have used these functions successfully and I know they work. What I don't
understand is how they work. I'm passing in a data table and the input
parameter is defined as 'ByVal dataTable as <dataset name>.<table name>

If this is a ByVal how can the values get back to the calling function?
 
B. Chernick,
<dataset name>.<table name> is a reference type. Which means that the object
itself exists on the Heap; variables, fields & parameters of a reference
type contain a reference to the object on the Heap.

Passing a reference type ByVal means that you are passing a copy of
reference by value, where as Passing a reference type ByRef means that you
are passing a reference to the reference.
 
Back
Top