首页 > Windows开发 > 详细

c# 显式实现接口的方法

时间:2017-10-01 10:54:11      阅读:307      评论:0      收藏:0      [点我收藏+]
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;


namespace ConsoleApplication2
{
    interface IBbb
    {
        void Fb();
    }

    class Aaa : IBbb
    {
        public void Fb()
        {
            Console.WriteLine("aaa fb");
        }

        void IBbb.Fb()
        {
            Console.WriteLine("ibbb fb");
        }
    }

    internal class Program
    {
        public static void Main(string[] args)
        {
            IBbb oa = new Aaa();
            oa.Fb();
            Aaa oc=new Aaa();
            oc.Fb();
        }


        
    }
}

 

c# 显式实现接口的方法

原文:http://www.cnblogs.com/zhaoxianglong1987/p/7616710.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!