We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 14b4cd6 commit 315289bCopy full SHA for 315289b
AbstractClassGeeksExample.cs
@@ -0,0 +1,37 @@
1
+using System;
2
+
3
+namespace AbstractClassExample
4
+{
5
+ internal abstract class AbstractClass
6
+ {
7
+ public int AddTwoNumber(int num1, int num2)
8
9
+ return num1 + num2;
10
+ }
11
12
+ public abstract int MultiplyTwoNumbers(int num1, int num2);
13
14
15
16
+ internal class Derived : AbstractClass
17
18
+ public override int MultiplyTwoNumbers(int num1, int num2)
19
20
+ return num1 * num2;
21
22
23
24
25
+ internal static class Program
26
27
+ public static void Main(string[] args)
28
29
+ var derived = new Derived();
30
31
+ Console.WriteLine(derived.AddTwoNumber(5, 5));
32
+ Console.WriteLine(derived.MultiplyTwoNumbers(5, 5));
33
34
35
36
37
+}
0 commit comments