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 chatLockScreenWindow static anyway?$codegif in chat$code, it's a command that makes the bot tell you how to post the codecs, new line, code, new line, triple backticksWindow is not static, so no class that inherits it can be staticWindow class?staticstatic class LockscreenWindow : Window
{
public override void DrawWindow()
{
Console.WriteLine("hi");
}
}class Window
{
public virtual void DrawWindow()
{
}
}LockScreenWindowcsWindowWindowstaticusing 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()
{
}
}