YAFLogo

MrHao
  • MrHao
  • 50.2% (Neutral)
  • YAF Forumling Topic Starter
11 years ago
Hi, everybody!

when I convert c # code to vb.net error occurred

Compiler Error Message: BC36641: Lambda parameter 'subrow' hides a variable in an enclosing block, a previously defined range variable, or an implicitly declared variable in a query expression.

Source Error:

Line 273: Dim arlist As New ArrayList()

Line 274:

Line 275: For Each subrow In Me.SubDataSource.Rows.Cast(Of DataRow)().Where(Function(subrow) row("ForumID").ToType(Of Integer)() = subrow("ParentID").ToType(Of Integer)())

Line 276: arlist.Add(subrow)

Line 277: Next

And

Exception Details: System.MissingMemberException: Public member 'IsNullOrEmptyDBField' on type 'DBNull' not found.

Source Error:

Line 76: arr = DirectCast(Me._dataSource, DataRow())

Line 77: For j As Interger = 0 To arr.Count() - 1

Line 78: If Not arr(j)("ParentID").IsNullOrEmptyDBField() Then

Line 79: If Me.SubDataSource Is Nothing Then

Line 80: Me.SubDataSource = arr(j).Table.Clone()

can you help me ?

Sponsor