以下のコード行 CopyToDataTable() は、使用可能な行がない場合にエラーをスローします。どのように対処すればよいですか?
<WebMethod()> _
Public Shared Function GetContestants() As String
Dim dttemp As DataTable
currentCount += pageSize
dttemp = dtContestantList.Rows.Cast(Of System.Data.DataRow)().Skip(currentCount).Take(pageSize).CopyToDataTable()
Return GetJson(dttemp)
End Function