Cannot access non-static method in static context?

前端 未结 3 2036
春和景丽
春和景丽 2021-02-04 17:02

Given this code....

public class CalibrationViewModel : ViewModelBase
{
    private FileSystemWatcher fsw;

    public CalibrationViewModel(Calibration calibrati         


        
3条回答
  •  春和景丽
    2021-02-04 17:25

    It's because Dispatcher is a class not a property. Shouldn't you be making your CalibrationViewModel class a subclass of some other class which has a Dispatcher property?

提交回复
热议问题