SerializationInfo.GetUInt64(String) 方法
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重要
此 API 不符合 CLS。
从 SerializationInfo 存储中检索一个 64 位无符号整数值。
public:
System::UInt64 GetUInt64(System::String ^ name);
C#
[System.CLSCompliant(false)]
public ulong GetUInt64 (string name);
[<System.CLSCompliant(false)>]
member this.GetUInt64 : string -> uint64
Public Function GetUInt64 (name As String) As ULong
- name
- String
与要检索的值关联的名称。
与 name
关联的 64 位无符号整数。
- 属性
name
为 null
。
与 name
关联的值不能转换为 64 位无符号整数。
当前实例中没有找到具有指定名称的元素。
如果值是 64 位无符号整数,或者可以转换为 1,则返回该值;否则, InvalidCastException 将引发 。 所有转换都由 IFormatterConverter 与此 SerializationInfo关联的 完成。
产品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |