35
1
using System;
2
3
public class A
4
{
5
static A()
6
{
7
Console.WriteLine("Static A Constructor");
8
}
9
public static void display()
10
{
11
Console.WriteLine("Display the Static Method of A Class");
12
}
13
}
14
public class B
15
{
16
static B()
17
{
18
Console.WriteLine("Static B Constructor");
19
}
20
public static void display()
21
{
22
Console.WriteLine("Display the Static Method of B Class");
23
}
24
}
25
26
public class StaticConstructorExample
27
{
28
public static void Main()
29
{
30
A.display();
31
Console.WriteLine();
32
B.display();
33
}
34
}
35
Cached Result