Soluga
asked on
C# IList conversion from VB
I am trying to conver my vb code below to C#. But I get the error "Using the gerneric type system.collections.generic .IList<T> requires 1 type arguments" where the iList is declared in the declaration.
Would be grateful for any help.
Thanks
Public Function CreateGrid(ByVal id As String,
ByVal allowGrouping As Boolean,
ByVal allowFiltering As Boolean,
ByVal showFooter As Boolean,
ByVal allowAddingRecords As Boolean,
ByVal autoGenerateColumns As Boolean,
ByVal pageSize As Integer,
ByVal showHeader As Boolean,
ByVal dataSource As IList) As Grid
C# Conversion.......
public Grid CreateGrid(string id, bool allowGrouping, bool allowFiltering, bool showFooter, bool allowAddingRecords, bool autoGenerateColumns, int pageSize, bool showHeader, IList dataSource)
Would be grateful for any help.
Thanks
Public Function CreateGrid(ByVal id As String,
ByVal allowGrouping As Boolean,
ByVal allowFiltering As Boolean,
ByVal showFooter As Boolean,
ByVal allowAddingRecords As Boolean,
ByVal autoGenerateColumns As Boolean,
ByVal pageSize As Integer,
ByVal showHeader As Boolean,
ByVal dataSource As IList) As Grid
C# Conversion.......
public Grid CreateGrid(string id, bool allowGrouping, bool allowFiltering, bool showFooter, bool allowAddingRecords, bool autoGenerateColumns, int pageSize, bool showHeader, IList dataSource)
ASKER
My datasource is a generic list!
ASKER
Would this work...
using System.Collections;
public Grid CreateGrid(string id, bool allowGrouping, bool allowFiltering, bool showFooter, bool allowAddingRecords, bool autoGenerateColumns, int pageSize, bool showHeader, IList<ICollection> dataSource)
using System.Collections;
public Grid CreateGrid(string id, bool allowGrouping, bool allowFiltering, bool showFooter, bool allowAddingRecords, bool autoGenerateColumns, int pageSize, bool showHeader, IList<ICollection> dataSource)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
OK,
Thats great thanks.
Thats great thanks.
Open in new window
This is it assuming your data type:
Open in new window