'protobuf DebugString() equivalent in .NET

I am working on a project on which protobuf is used in C++. They store in a database the DebugString() output of the message.

I have a .NET (C#) component where I also have protobuf message. I need to send to their C++ component a string which would be the content of the C++ DebugString(). But since I am in C# I didn't find the equivalent. ToString() is producing a JSON string which is not at all the same output as DebugString().

I know that DebugString() should not be used for other things than debugging. I have no control over that. My question: is there an equivalent in C# for the C++ DebugString() that would produce the exact same string?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source