次の方法で共有


XmlConvert.ToUInt16 メソッド

String を等価の UInt16 に変換します。

このメソッドは、CLS と互換性がありません。CLS との互換性に関する詳細については 「共通言語仕様の概要」 を参照してください。

<CLSCompliant(False)>
Public Shared Function ToUInt16( _   ByVal s As String _) As UInt16
[C#]
[CLSCompliant(false)]
public static ushort ToUInt16(strings);
[C++]
[CLSCompliant(false)]
public: static unsigned short ToUInt16(String* s);
[JScript]
public
   CLSCompliant(false)
static function ToUInt16(s : String) : UInt16;

パラメータ

  • s
    変換する文字列。

戻り値

文字列と等価の UInt16

例外

例外の種類 条件
ArgumentNullException s が null 参照 (Visual Basic では Nothing) です。
FormatException s の形式が正しくありません。
OverflowException sUInt16.MinValue 未満の数値か、 UInt16.MaxValue より大きい数値を表しています。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET, Common Language Infrastructure (CLI) Standard

参照

XmlConvert クラス | XmlConvert メンバ | System.Xml 名前空間