https://docs.microsoft.com/en-us/dotnet/api/system.bitconverter.tostring?view=netframework-4.8#System_BitConverter_ToString_System_Byte___
On Wed, Sep 4, 2019 at 11:17 PM arun kumar <[email protected]> wrote: > I am trying to serialize the data using C# Google protobuf, and I am using > below code , > > private static void printStream(IMessage msg) > { > > > int size = msg.CalculateSize(); > byte[] buffer = new byte[size]; > CodedOutputStream output = new CodedOutputStream(buffer); > msg.WriteTo(output); > foreach (byte bb in buffer) > { > Console.Write(bb); > } > } > > JSON of IMessage Object is > > { > "clientIdentifier": { > "context": "CFID", > "value": "12340000" > }, > "desiredSessionTimeout": "30000" > } > > > When I print the bytes, I am getting :: > 1081862151092482117752161762341.. I believe, it is giving dec value > whereas I am expecting hex value : 0a0a1208313233343030303010b0ea01. > > Please help me out , how to get the hex value.. > > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/protobuf/14bd44ad-10e4-4398-911f-efddad5cbc56%40googlegroups.com > <https://groups.google.com/d/msgid/protobuf/14bd44ad-10e4-4398-911f-efddad5cbc56%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- -Nadav -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/CANZcNEred%2BXf1GseN2RLooDoWyr_LuSkPBp4Qbn%2BixiQSVkErA%40mail.gmail.com.
