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:
01479694
Views:
40
>>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)
>        {
>
>        }
>    }
Thanks Viv!
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Reply
Map
View

Click here to load this message in the networking platform