在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
本文整理汇总了C#中System.UInt16.Parse方法的典型用法代码示例。如果您正苦于以下问题:C# UInt16.Parse方法的具体用法?C# UInt16.Parse怎么用?C# UInt16.Parse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。 在下文中一共展示了UInt16.Parse方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。 示例1: Main
开发者ID:.NET开发者,项目名称:System,代码行数:43,代码来源:UInt16.Parse 输出: Parsing strings using the English (United States) culture Style: Integer Converted '1702' to 1702. Unable to parse '+1702.0'. Unable to parse '+1702,0'. Unable to parse '-1032.00'. Unable to parse '-1032,00'. Unable to parse '1045.1'. Unable to parse '1045,1'. Style: Integer, AllowDecimalPoint Converted '1702' to 1702. Converted '+1702.0' to 1702. Unable to parse '+1702,0'. '-1032.00' is out of range of the UInt16 type. Unable to parse '-1032,00'. '1045.1' is out of range of the UInt16 type. Unable to parse '1045,1'. Parsing strings using the French (France) culture Style: Integer Converted '1702' to 1702. Unable to parse '+1702.0'. Unable to parse '+1702,0'. Unable to parse '-1032.00'. Unable to parse '-1032,00'. Unable to parse '1045.1'. Unable to parse '1045,1'. Style: Integer, AllowDecimalPoint Converted '1702' to 1702. Unable to parse '+1702.0'. Converted '+1702,0' to 1702. Unable to parse '-1032.00'. '-1032,00' is out of range of the UInt16 type. Unable to parse '1045.1'. '1045,1' is out of range of the UInt16 type. 示例2: Main
开发者ID:.NET开发者,项目名称:System,代码行数:33,代码来源:UInt16.Parse 输出: Attempting to convert ' 214 ': None: Bad Format AllowLeadingWhite, AllowTrailingWhite: 214 Integer, AllowTrailingSign: 214 AllowThousands, AllowCurrencySymbol: Bad Format AllowDecimalPoint, AllowExponent: Bad Format Attempting to convert '1,064': None: Bad Format AllowLeadingWhite, AllowTrailingWhite: Bad Format Integer, AllowTrailingSign: Bad Format AllowThousands, AllowCurrencySymbol: 1064 AllowDecimalPoint, AllowExponent: Bad Format Attempting to convert '(0)': None: Bad Format AllowLeadingWhite, AllowTrailingWhite: Bad Format Integer, AllowTrailingSign: Bad Format AllowThousands, AllowCurrencySymbol: Bad Format AllowDecimalPoint, AllowExponent: Bad Format Attempting to convert '1241+': None: Bad Format AllowLeadingWhite, AllowTrailingWhite: Bad Format Integer, AllowTrailingSign: 1241 AllowThousands, AllowCurrencySymbol: Bad Format AllowDecimalPoint, AllowExponent: Bad Format Attempting to convert ' + 214 ': None: Bad Format AllowLeadingWhite, AllowTrailingWhite: Bad Format Integer, AllowTrailingSign: Bad Format AllowThousands, AllowCurrencySymbol: Bad Format AllowDecimalPoint, AllowExponent: Bad Format Attempting to convert ' +214 ': None: Bad Format AllowLeadingWhite, AllowTrailingWhite: Bad Format Integer, AllowTrailingSign: 214 AllowThousands, AllowCurrencySymbol: Bad Format AllowDecimalPoint, AllowExponent: Bad Format Attempting to convert '2153.0': None: Bad Format AllowLeadingWhite, AllowTrailingWhite: Bad Format Integer, AllowTrailingSign: Bad Format AllowThousands, AllowCurrencySymbol: Bad Format AllowDecimalPoint, AllowExponent: 2153 Attempting to convert '1e03': None: Bad Format AllowLeadingWhite, AllowTrailingWhite: Bad Format Integer, AllowTrailingSign: Bad Format AllowThousands, AllowCurrencySymbol: Bad Format AllowDecimalPoint, AllowExponent: 1000 Attempting to convert '1300.0e-2': None: Bad Format AllowLeadingWhite, AllowTrailingWhite: Bad Format Integer, AllowTrailingSign: Bad Format AllowThousands, AllowCurrencySymbol: Bad Format AllowDecimalPoint, AllowExponent: 13 示例3: Main
开发者ID:.NET开发者,项目名称:System,代码行数:27,代码来源:UInt16.Parse 输出: '-0' --> 0 '17' --> 17 '-12' --> OverflowException '185' --> 185 '66012' --> OverflowException '+0' --> 0 '' --> Bad Format '' --> Null '16.1' --> Bad Format '28.0' --> Bad Format '1,034' --> Bad Format 示例4: Main
开发者ID:.NET开发者,项目名称:System,代码行数:36,代码来源:UInt16.Parse 输出: Parsing with the culture. Converted '++1403' to 1403. Converted '-0' to 0. The format of '+0' is invalid. The format of '+16034' is invalid. '-32768' is outside the range of a UInt16 value. The format of '14.0' is invalid. Converted '18012' to 18012. Parsing with the '' culture. The format of '++1403' is invalid. Converted '-0' to 0. Converted '+0' to 0. Converted '+16034' to 16034. '-32768' is outside the range of a UInt16 value. The format of '14.0' is invalid. Converted '18012' to 18012. 注:本文中的System.UInt16.Parse方法示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论