Run Code
|
Code Wall
|
Users
|
Misc
|
Feedback
|
About
|
Login
|
Theme
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.
Changing asp net user password
blanaced parenthes
Main5.1
7.1. Asynchrony: the new approach
Jp-trize
Des encryption
Hi
Milimeters
C# Abstract Syntax Tree Example: Simple Pascal Compiler
What is the best way to iterate over a Dictionary in C#?
Please log in to post a comment.