Another question.
How to switch off properties when I make inheritance?
For example. We have 3 "cash givings" in the Crate object:
GiveCashCrateAction@1
GiveCashCrateAction@2
GiveCashCrateAction@3
The code, for details
(it is not very important now).
Code: Select all
GiveCashCrateAction@1:
Amount: 750
SelectionShares: 25
UseCashTick: true
GiveCashCrateAction@2:
Amount: 1000
SelectionShares: 50
UseCashTick: true
GiveCashCrateAction@3:
Amount: 1500
SelectionShares: 25
UseCashTick: true
Actually, I can switch off them (in new object) by dint of "-".
-GiveCashCrateAction@1:
-GiveCashCrateAction@2:
-GiveCashCrateAction@3:
My aim.
I would like to switch off all them. At one line.
But if write
-GiveCashCrateAction:
it gives error
Exception of type `System.ArgumentException`: Collection must not be empty.
The same error with
-GiveCashCrateAction@1-3:
---------------------------------
So why do I need it, in general?
Of course, it is not difficult to write
three lines.
But! This is not so easy, for example, for
GiveUnitCrateAction.
It is more than
twenty properties!
GiveUnitCrateAction@LightInfantry:
GiveUnitCrateAction@Trooper:
GiveUnitCrateAction@Engineer:
GiveUnitCrateAction@Thumper:
GiveUnitCrateAction@Grenadier:
and many other.