How can i call method from class but this method implemented from any interface?

Posted by Phsika on Stack Overflow See other posts from Stack Overflow or by Phsika
Published on 2010-05-30T18:32:10Z Indexed on 2010/05/30 18:52 UTC
Read the original article Hit count: 428

Filed under:
|
|
|
|

i try to call base.Alan(); in HacimBul. But base. dont give intellisense alan method

   public double HacimBul()
        {
            throw new Exception();
            //return base..... --> how can i see base.Alan();
        }

namespace interfaceClass
{
    class Program
    {
        static void Main(string[] args)
        {

        }
    }

    interface Ikenar
    {
       double kenar { get; set; }
    }

    interface Iyukseklik
    {
        double yuksekli {get; set;}
    }
    interface IAlan
    {
        double Alan();
    }
    interface IHacim
    {
        double Hacim();
    }

    class Alan : Ikenar, IAlan
    {
        public double kenar
        {
            get;
            set;
        }

        double IAlan.Alan()
        {
            return kenar * kenar;
        }
    }

    class Hacim : Alan, Iyukseklik
    {

        public double kenar
        {
            get;
            set;
        }

        public double yuksekli
        {
            get;
            set;
        }

        public double HacimBul()
        {
            throw new Exception();
            //return base..... --> how can i see base.Alan();
        }
   }
}

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET