Re: Call method of object variable

2020-10-16 Thread Andrey via Digitalmars-d-learn
Thank you!

Re: Call method of object variable

2020-10-16 Thread Simen Kjærås via Digitalmars-d-learn
On Friday, 16 October 2020 at 08:12:59 UTC, Andrey wrote: Hi, I have got: struct Qaz { wstring read() {return null;} wstring hear() {return "";} } void main() { // ... static if(some_condition) alias method = Qaz.hear; else alias method = Qaz.read; // ... Qaz

Call method of object variable

2020-10-16 Thread Andrey via Digitalmars-d-learn
Hi, I have got: struct Qaz { wstring read() {return null;} wstring hear() {return "";} } void main() { // ... static if(some_condition) alias method = Qaz.hear; else alias method = Qaz.read; // ... Qaz qaz; qaz.method(); // ??? } How to call alias