码迷,mamicode.com
首页 > 其他好文 > 详细

对象的思考1

时间:2014-06-26 00:27:11      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:style   class   blog   code   ext   color   

一个对象能自己能否作为自己的一个成员?

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication5
{
    class doubi
    {
        doubi d =new doubi();
        int flag;
        public doubi()
        {
            flag = 0;
            Console.WriteLine(d.flag);
        }
        private void put()
        {
            Console.WriteLine(d.flag);
        }
    }
    class Program
    {

        static void Main(string[] args)
        {
            doubi db = new doubi();
        }
    }
}

无限循环...

对象的思考1,布布扣,bubuko.com

对象的思考1

标签:style   class   blog   code   ext   color   

原文地址:http://www.cnblogs.com/Fadinglemon/p/3804182.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!