C
C Williams
Hi.
I have two classes, A and B. A has a public property that returns a
DataTable (an instance variable within the class)
In a class B has a reference to class A. Within a function in class B,
I need to use the datatable from class A. Which of the following is a
better way to do it:
BFunction()
dim tmpTable as DataTable = a.Table
'use variable tmpTable five or six times
BFunction()
'use "a.Table" instead of tmpTable five or six times
Will a.Table and tmpTable point to the same memory, or is a copy made
each time?
Thanks!
-Casey
I have two classes, A and B. A has a public property that returns a
DataTable (an instance variable within the class)
In a class B has a reference to class A. Within a function in class B,
I need to use the datatable from class A. Which of the following is a
better way to do it:
BFunction()
dim tmpTable as DataTable = a.Table
'use variable tmpTable five or six times
BFunction()
'use "a.Table" instead of tmpTable five or six times
Will a.Table and tmpTable point to the same memory, or is a copy made
each time?
Thanks!
-Casey