美文网首页
1.7 给自己创建的类的对象赋值

1.7 给自己创建的类的对象赋值

作者: 陈玉涛 | 来源:发表于2018-08-06 20:04 被阅读0次

    ``` shift

    DevInfoSet GetDevinfo(string pakagename)

            {

                if (devInfo == null)//判断对象是否为空

                {

                    devInfo = new DevInfoSet()//赋值

                    {

                        sinaweibo = new SinaWeiboDevInfo(),

                        facebook = new Facebook(),

                        qq = new QQ(),

                        qzone = new QZone(),

                        wechatMoments = new WeChatMoments(),

                        wechat = new WeChat()

                    };

                }

                return devInfo;

            }

    ```

    相关文章

      网友评论

          本文标题:1.7 给自己创建的类的对象赋值

          本文链接:https://www.haomeiwen.com/subject/iezgvftx.html