まず、例から始めましょう。
Public Class EmpDemo
Public Function getEmpData() as DataSet
End Function
End Class
ケース 1:
Dim ds as New DataSet 'A DataSet instance gets created here
ds = EmpDemo.getEmpData() 'Another DataSet instance gets created here
ケース 2:
Dim ds as DataSet
ds = EmpDemo.getEmpData() 'A single instance gets created here
質問:
ケース 1を選択した場合、ページのパフォーマンスにどのような影響がありますか? ケース 2が最良の選択であることをどのように証明しますか?