我想写一个参数,接受<代码>List<T>和DataRowCollection
,作为价值,既可索引又可编号,但我不知道如何做到这一点。 是否可利用现有的班级和接口?
附录
我想写一个参数,接受<代码>List<T>和DataRowCollection
,作为价值,既可索引又可编号,但我不知道如何做到这一点。 是否可利用现有的班级和接口?
附录
您不能具体说明诸如<代码>T>的一类制约因素:[],没有索引人财产的通用接口。 <代码>List and DataRowCollection
both are IE amountable
and ICollection
,但我假定,ttt=已使你受益很多。 因此,不可能具体指明“A类需要是一种指数化收集”。
<>Update: 我刚刚看到,<代码>DataRowCollection有一个<代码>List,将收集工作作为<代码>ArrayList,该编码为
<>Update 2 另一种选择:您可针对< 编码>IE 计数编码>,并使用LinqElementAt(
。 无法确定它是否将使用<代码>DataRowCollection的索引财产。
http://msdn.microsoft.com/en-us/library/6sh2ey19.aspx” rel=“nofollow”List<T>
和DataRowlection/code><><>/code><<>>>>> 执行
因此,你可以根据这种方法需要做些什么加以利用。
What is the use of default keyword in C#? Is it introduced in C# 3.0 ?
I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...
I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...
I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...
I have two EF entities. One has a property called HouseNumber. The other has two properties, one called StartHouseNumber and one called EndHouseNumber. I want to create a many to many association ...
How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...
Since I cannot order my dictionary, what is the best way of going about taking key value pairs and also maintaing an index?
Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...