分配十进制值

编程入门 行业动态 更新时间:2024-10-26 12:23:59
本文介绍了分配十进制值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, 我正在用Fedex Web服务开发一个Asp.Net应用程序.当我为联邦快递的重量信息赋值时,我遇到了一些问题.

Hi everybody, I am developing an Asp.Net application with Fedex web services. When i assign value to the Fedex weight information i get some problem.

decimal packweight = 10.5M; request.RequestedShipment.RequestedPackageLineItems[0].Weight.Value = packweight;

在上面的代码中,我将packweight小数变量值设置为fedex权重.但是它出现了一些错误.架构验证请求失败.

In the above code i set packweight decimal variable value to the fedex Weight. But its getting some error. Schema validation failed to request.

request.RequestedShipment.RequestedPackageLineItems[0].Weight.Value = 10.5M;

在上面的代码中,我直接分配权重值.它的工作正常,我得到了联邦快递费率服务的响应.在我的应用程序中,我想动态获取重量值并将其设置为Fedex.请帮助我解决该错误.

In the above code i directly assign the Weight value. Its working fine and i get the rerponse from the Fedex Rate services. In my application i want to dynamically get the weight value and set to the Fedex. Kindly assist me to fix the error.

推荐答案

您尝试使用float代替了吗? Have you tried to use float instead??

更多推荐

分配十进制值

本文发布于:2023-10-09 10:31:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1475493.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:分配   十进制值

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!