c# - What does "The non-generic type 'System.Web.UI.Pair' cannot be used with type arguments" mean? -
foreach (pair<pair<int, int>, cell> cell in sheet.cells) { dgvcells[cell.left.right, cell.left.left].value = cell.right.value; }
i working on creating excel file within .net, using excel library
i getting warning mentioned in title. ideas?
just future reference, , understanding, error message:
the non-generic type '' cannot used type arguments
replaced class, indicates within code attempting make use of non-generic class in generic way. more using syntax incompatible type, in case <> generic braces on type "pair".
to typically solve problem
- identify types use within file, use in generic way. (this should find them: ctrl + f > "someclass<")
- ensure type expected (f12 on type should take declaration)
if type different expected type should make use of using alias point correct type namespace i.e.
using pair = fully.qualified.namespace.of.pair;
if type expected ensure generic, if not can either modify generic, if have permission/access so, or select/create different type more suitable purpose.
- alternativly modify use of type non-generic
Comments
Post a Comment