Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling Base Constructor
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01479684
Message ID:
01479688
Views:
44
>How do I correctly do this?
>
>
>public class Program
>{
>    static void Main(string[] args)
>    {
>        // Pass 10 to the base
>        SomeClass theclass = new SomeClass(10);
>    }
>}
>
>    
>public class SomeClass : _MyBase
>{
>    public SomeClass()
>    {
>            
>    }
>}
>
>public class _MyBase
>{
>    int x = 0;
>
>    public _MyBase(int x)
>    {
>        this.x = x;
>    }
>}
>
>
>Thanks
   public class SomeClass : _MyBase
    {
        public SomeClass(int i):base(i)
        {

        }
    }
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform