C#C
C#3y ago
arch_il

✅ cannot be accessed with an instance reference

public static class Details
{
    // class for drawing event
    public class EventDrawModel
    {
        public static string title { get; set; }
    }

    // model for drawing event
    private static EventDrawModel eventDrawModel = new EventDrawModel();

    // this is specific update func only called when selected event is changed
    public static void Update()
    {
        Details.eventDrawModel.title = "";
    }
}

Member 'Details.EventDrawModel.title' cannot be accessed with an instance reference; qualify it with a type name instead

How would one fix this issue?
Was this page helpful?