Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Execution flow of static and normal constructor of base and derived class.
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; namespace Rextester { public class Employee { int EmpNo { get; set;} string FirstName { get; set;} static Employee() { Console.WriteLine("Employee static class Constrctor 1 "); } public Employee(int i ) { Console.WriteLine("Employee perameter class Constrctor 5 "); } } public class FixEmployee :Employee { static FixEmployee() { Console.WriteLine("Fix Employee static class Constrctor 3 "); } public FixEmployee() : base(4) { Console.WriteLine("Fix Employee class Constrctor 4 "); } } public class Program { public static void Main(string[] args) { //Your code goes hereix int i = 4; FixEmployee em = new FixEmployee(); // Employee am = new Employee(i); Console.WriteLine("Hello, world!"); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Polymorphism example
Generics Base class constraints
Understandiing Virtual, Override, New Keyword in C#
Liczba powtórzająca
addr.sin_family == AF_UNSPEC
Singleton Design Pattern
ByRef
UF pc
4.2 Casting
Bubble sort
Please log in to post a comment.