scriptsharp
scriptsharp copied to clipboard
Unable to access private instance method from static method of same class
Here is the code
public class Utilizer {
public static void Crash(Container container) {
container.Utilizer.Crahser();
}
private void Crahser() {
}
}
public class Container {
private Utilizer utilizer;
public Utilizer Utilizer {
get {
return utilizer;
}
set {
utilizer = value;
}
}
}
looks like because it's calling a method from an instance variable in the argument of the same type of the static method.
Edit (10/31, nikhilk): edited title to something more specific to reflect the issue