tornixdev
tornixdev
CC#
Created by tornixdev on 4/10/2023 in #help
❔ abstract class vs interface
public interface IFoo
{
protected static string GetFormattedTime() => DateTime.Now.ToString("HH:mm");

public void Foo();
public void Bar();
}

public class Baz : IFoo
{
public void Foo() { ... }
public void Bar() => Console.Writeline(IFoo.GetFormattedTime())
}
public interface IFoo
{
protected static string GetFormattedTime() => DateTime.Now.ToString("HH:mm");

public void Foo();
public void Bar();
}

public class Baz : IFoo
{
public void Foo() { ... }
public void Bar() => Console.Writeline(IFoo.GetFormattedTime())
}
would an abstract class be appropriate here? or would this be just fine?
13 replies
CC#
Created by tornixdev on 9/10/2022 in #help
Hotkey system
trying to make a hotkey system, i'm not sure how to get the user's key input after a click of a button
12 replies