Changing types during binary deserialization in C#

后端 未结 2 407
星月不相逢
星月不相逢 2020-12-17 04:22

One of the solutions in our company consumes a 3rd party service. Communication is done through XML messaging. On our end, we generate classes to be used based on XML sche

2条回答
  •  心在旅途
    2020-12-17 05:22

    If we convert boolean to integer, that would be either 0 or 1. Can you please try:

    int val=int.Tryparse(myBooleanValue);
    

    Or

    int val= myBooleanValue?1:0;
    

提交回复
热议问题