Generic List Single Item
Working with Generic Lists in a data class has been quite rewarding. I still occasionally return Datasets but typically everything I need to do can be done using the List items. It is a breeze to return entire list, datasets or in this case just an integer .... the project is program_data, class is pdMain and public function is getProgramInfo with 2 parameters. I just want the Fiscal Week value - function typically returns an entire list of data but I just want the first record and one item - I would do it something like this:
'GENERIC LIST - SINGLE ITEM
Dim temp As String = program_Data.pdMain.getProgramInfo("HMD", "")(0).FiscalWeek
lblFiscalWeek.Text = temp
Comments