Calling a method from static class which also inherits from a non static class
Calling a method from static class which also inherits from a non static class
$codegif in chat$codegif in chat$codegif in chat$codegif in chatstatic class LockscreenWindow : Window
{
public override void DrawWindow()
{
Console.WriteLine("hi");
}
}class Window
{
public virtual void DrawWindow()
{
}
}LockScreenWindow$codecsWindowWindowstaticusing System;
class WindowManager
{
public enum WindowName
{
Lockscreen,
Homescreen
}
public void SwitchWindow(WindowName _wName)
{
if(_wName == WindowName.Lockscreen)
{
LockscreenWindow.DrawWindow();
}
}
}class Window
{
public virtual void DrawWindow()
{
}
}