首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

内存溢出错误,大家帮忙来看看

2012-01-19 
内存溢出异常,大家帮忙来看看!usingSystemusingSystem.Collections.GenericusingSystem.TextnamespaceC

内存溢出异常,大家帮忙来看看!
using   System;
using   System.Collections.Generic;
using   System.Text;

namespace   ConsoleApplication2
{
        public   class   Program
        {
                public   static   void   Main(string[]   args)
                {
                        B   b   =   new   B();
                        Console.WriteLine(b.Count);
                        Console.Read();
                }
        }
        public   interface   A
        {
                void   print();
                int   Count
                {
                        get;
                }
        }
        public   class   B   :   A
        {
                #region   A   成员

                void   A.print()
                {
                        Console.WriteLine( "I   am     B! ");
                }
                public   int   Count
                {
                        get   {   return   Count;   }
                }

                #endregion
        }
}

[解决办法]
死循环

private int c=0;
public int Count
{
get { return c; }
}

*****************************************************************************
欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码)

最新版本:20070130

http://www.cnblogs.com/feiyun0112/archive/2006/09/20/509783.html
[解决办法]
yes

public int Count
{
get { return Count; }
}
这里是有问题
[解决办法]
up

热点排行