I\'m converting a C++ program to C#, but this part has me confused. What does return *this mean?
template< EDemoCommands msgType, typename PB_OBJECT_TYPE
In your particular case, you are returning the reference to 'this', since the return type of the function is a reference (&).
Speaking of the size of returned memory, it is the same as
virtual ::google::protobuf::Message* GetProtoMsg() { return this; }
But the usage at call time differs.
At call time, you will call store the return value of the function by something like:
Message& m = GetProtoMsg();