I use the following code:
WMPEqualizerSettingsCtrl eq = null;
eq.enhancedAudio = true;
But I get an error:
Object reference not set to an instance of an object.
I use the following code:
WMPEqualizerSettingsCtrl eq = null;
eq.enhancedAudio = true;
But I get an error:
Object reference not set to an instance of an object.
Copyright © 2021 Jogjafile Inc.
Yes, you've set the
eqobject equal tonullwhen declaring it. That is what produces the exception: you can't set the properties of an object that doesn't exist!If you want to create an instance of the
WMPEqualizerSettingsCtrlclass, just usenew:I don't know exactly what the
WMPEqualizerSettingsCtrlclass is, but you might need to pass some parameters to the constructor. Those provide the class with additional information about exactly how you want it to be created.