C#问题 怎么用递归计算一个链表的长度?不用递归的我会,请大师们给个例子参考下。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 int GetLength(){int j=0;for (int i=0;i<this.GetLength();i++) j++;return j;}为什么不行? 就是按照你的思路做的,可是提示stackoverflow exception。怎么回事? 假设还是你之前的代码:class Node { public Node Next; public int Data; public int GetLength() { if (Next == null) return 1; else return Next.GetLength() + 1; }} 为什么得到的文字多了一个/呢,怎么取才会只有一个/呀 textbox滚动条 如何匹配这个正则表达式 如何在ListView单元中使用combobox进行编辑? 自己想的几个程序创意大家说说如何? .NET2005 下在不同的命名空间如何让两个命名空间的对像互相引用 高手帮忙看看我这段代码什么问题好吗? 我的系统有两卡声卡,在控制面版里可以选择某块声卡设备为系统当前音频的回放的首选设备,怎样用程序实现呢? 传递参数高高问题 today,用visual c# 写了一个 分析IP网关log的东西 小弟刚刚学C#求指导 .net运行时报此错,如何解决
{
int j=0;
for (int i=0;i<this.GetLength();i++)
j++;
return j;
}
为什么不行?
public Node Next;
public int Data;
public int GetLength()
{
if (Next == null) return 1;
else return Next.GetLength() + 1;
}
}