You must Sign In to post a response.
  • Category: ASP.NET

    Abstract Property Overriding

    i want to return the multiple values by overriding the abstract ptoperty (testCode )...

    please check the code and let me know how to do please...


    my base class...

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

    namespace AbstractProperties2
    {
    abstract class ParentClass
    {

    protected abstract testCode YardType { get; }
    public enum testCode
    {
    val1 = 1,
    val2 = 2,
    val3 = 3,
    val4 = 4,
    val5 = 5,
    val6 = 6,
    val7 = 7
    }

    }
    }

    ....

    my ChildClass

    .....

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

    namespace AbstractProperties2
    {
    class ClildClass : ParentClass
    {
    protected override testCode YardType { get {
    return testCode.val2;// here i want to pass value like testCode.val2,testCode.val3
    }
    }

    static void Main(string[] args)
    {
    ClildClass c1 = new ClildClass();
    Console.WriteLine(c1.YardType);
    Console.Read();
    }
    }
    }
  • #477328
    public object[] Function()

    {
    }

    Regards,
    Kiran.

  • #477332
    kiran can u be a bit clear pleaseeeee.....


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.