Cannot Assign to 'X' Because It Is a 'Method Group'

This has been rattling my head for a day now and I feel I’m so close to solving it with the help of Google. I have a method group which is an int. public int GetCurrencyPerSec()I can get the int from this by saying data.test = GetCurrencyPerSec(); but I want to go the other way. I’d like this line to work GetCurrencyPerSec() = data.test;

Basically I would like to set the int of GetCurrencyPerSec()

If this makes sense to anyone, please point me in the right direction.

a) Add a new method “public void SetCurrencyPerSec(int value)” that sets the variable

or

b) Use C# properties: Using Properties - C# Programming Guide | Microsoft Learn