-
Notifications
You must be signed in to change notification settings - Fork 0
/
ClassToDemoProps.cs
44 lines (40 loc) · 1.11 KB
/
ClassToDemoProps.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System;
using System.Collections.Generic;
using System.Text;
namespace CSharpFoundations
{
class ClassToDemoProps
{
public int Amount { get; set; }
public int DoubleTheAmount()
{
return Amount * 2;
}
}
public static class Converter
{
public static double FarennheightToCelsius(double Farennheight)
{
double dblRet = (Farennheight - 32)*5/9;
return dblRet;
}
public static double CelsiusToFarennheight(double Celsius)
{
double dblRet = (Celsius * 9 / 5) + 32;
return dblRet;
}
}
public abstract partial class parent
{
public abstract void abstractMethod();
public virtual string name => "parent";
}
public partial class child : parent
{
partial void VirtualMethod();
public void CallVirtualMethod() { VirtualMethod(); }
string str = "child abstractMethod()";
public override void abstractMethod() => Console.WriteLine($"{str}");
public override string name => "child";
}
}