How to assign System.Type and object values from c#.net to protobuf

105 Views Asked by At

google.protobuf.Type Type = 1;

Using below code I am trying to assign the value which is system.type to WellKnownTypes.Type.

scanParameter.Type = (Google.Protobuf.WellKnownTypes.Type)parameter.ValueDataType;

It is giving me compile time error saying Invalid Cast.

how to handle this

Thanks

0

There are 0 best solutions below