【问题标题】:Linklist Error Next Method?链接列表错误下一个方法?
【发布时间】:2009-08-30 13:37:08
【问题描述】:
using System;
using System.Drawing;
using System.IO;
using System.Security.Cryptography;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using System.Threading;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;

        InitializeComponent();
        llname.AddLast("22");
        llname = llname.Next;

错误 1“System.Collections.Generic.LinkedList”不包含“Next”的定义,并且找不到接受“System.Collections.Generic.LinkedList”类型的第一个参数的扩展方法“Next”(是您缺少 using 指令或程序集引用?) D​​:\Documents and Settings\Administrator\Desktop\SaveShared\DigALL\Form1.cs 38 29 MoodigX


【问题讨论】:

    标签: c#


    【解决方案1】:

    LinkedList<T> 没有下一个,但LinkedListNode<T> 有。

     LinkedListNode<string> node = llname.AddLast("22");
     LinkedListNode<string> next = node.Next;  
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-09-09
      • 1970-01-01
      相关资源
      最近更新 更多