有引用啊,要指针干什么!
真要指针,c#也可以啊。

解决方案 »

  1.   

    using System;namespace ConsoleApplication1
    {
    public class Test
    {
    public int Data;
    public Test Next;
    }
    /// <summary>
    /// Summary description for Class1.
    /// </summary>
    class Class1
    {
    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    [STAThread]
    static void Main(string[] args)
    {
    //
    // TODO: Add code to start application here
    //
    Test head=new Test();
    Test temp;
    head.Data=-1;
    temp=head;
    for(int i=0;i<3;i++)
    {
    temp.Next=new Test();
    temp=temp.Next;
    temp.Data=i;
    }
    temp.Next=null;
    temp=head.Next;
    for(int i=0;i<3;i++)
    {
    Console.WriteLine("{0} Data is {1}",i,temp.Data);
    temp=temp.Next;
    }
    }
    }
    }