편집

다음을 통해 공유


NSCoder.Encode Method

Definition

Overloads

Encode(NSObject)

Encodes the specified object.

Encode(NSObject, String)
Encode(Boolean, String)

Encodes the value using the associated key.

Encode(Byte[], String)

Encodes the byte array using the specified associated key.

Encode(Double, String)

Encodes the double value using the specified associated key.

Encode(Int32, String)

Encodes the integer value using the specified associated key.

Encode(Int64, String)

Encodes the long value using the specified associated key.

Encode(nint, String)

Encodes the platform-specific native integer (32 or 64 bits) using the specified associated key.

Encode(Single, String)

Encodes the floating point value using the specified associated key.

Encode(Byte[], Int32, Int32, String)

Encodes a segment of the buffer using the specified associated key.

Encode(NSObject)

Encodes the specified object.

[Foundation.Export("encodeObject:")]
public virtual void Encode (Foundation.NSObject obj);
abstract member Encode : Foundation.NSObject -> unit
override this.Encode : Foundation.NSObject -> unit

Parameters

obj
NSObject

Object to encode.

This parameter can be null.

Attributes

Applies to

Encode(NSObject, String)

[Foundation.Export("encodeObject:forKey:")]
public virtual void Encode (Foundation.NSObject val, string key);
abstract member Encode : Foundation.NSObject * string -> unit
override this.Encode : Foundation.NSObject * string -> unit

Parameters

val
NSObject

Object to encode.

This parameter can be null.

key
String

Key to associate with the object being encoded.

Attributes

Applies to

Encode(Boolean, String)

Encodes the value using the associated key.

[Foundation.Export("encodeBool:forKey:")]
public virtual void Encode (bool val, string key);
abstract member Encode : bool * string -> unit
override this.Encode : bool * string -> unit

Parameters

val
Boolean

value to enecode.

key
String

Key to associate with the object being encoded.

Attributes

Applies to

Encode(Byte[], String)

Encodes the byte array using the specified associated key.

public void Encode (byte[] buffer, string key);
member this.Encode : byte[] * string -> unit

Parameters

buffer
Byte[]

Byte array to encode.

key
String

Key to associate with the object being encoded.

Applies to

Encode(Double, String)

Encodes the double value using the specified associated key.

[Foundation.Export("encodeDouble:forKey:")]
public virtual void Encode (double val, string key);
abstract member Encode : double * string -> unit
override this.Encode : double * string -> unit

Parameters

val
Double

Double value to enecode.

key
String

Key to associate with the object being encoded.

Attributes

Applies to

Encode(Int32, String)

Encodes the integer value using the specified associated key.

[Foundation.Export("encodeInt32:forKey:")]
public virtual void Encode (int val, string key);
abstract member Encode : int * string -> unit
override this.Encode : int * string -> unit

Parameters

val
Int32

Integer value to encode.

key
String

Key to associate with the object being encoded.

Attributes

Applies to

Encode(Int64, String)

Encodes the long value using the specified associated key.

[Foundation.Export("encodeInt64:forKey:")]
public virtual void Encode (long val, string key);
abstract member Encode : int64 * string -> unit
override this.Encode : int64 * string -> unit

Parameters

val
Int64

Long value to encode.

key
String

Key to associate with the object being encoded.

Attributes

Applies to

Encode(nint, String)

Encodes the platform-specific native integer (32 or 64 bits) using the specified associated key.

[Foundation.Export("encodeInteger:forKey:")]
public virtual void Encode (nint val, string key);
abstract member Encode : nint * string -> unit
override this.Encode : nint * string -> unit

Parameters

val
System.System.IntPtr System.nativeint

Native integer value to encode.

key
String

Key to associate with the object being encoded.

Attributes

Applies to

Encode(Single, String)

Encodes the floating point value using the specified associated key.

[Foundation.Export("encodeFloat:forKey:")]
public virtual void Encode (float val, string key);
abstract member Encode : single * string -> unit
override this.Encode : single * string -> unit

Parameters

val
Single

Floating point value to encode.

key
String

Key to associate with the object being encoded.

Attributes

Applies to

Encode(Byte[], Int32, Int32, String)

Encodes a segment of the buffer using the specified associated key.

public void Encode (byte[] buffer, int offset, int count, string key);
member this.Encode : byte[] * int * int * string -> unit

Parameters

buffer
Byte[]

Byte array to encode.

offset
Int32

Starting point in the buffer to encode.

count
Int32

Number of bytes starting at the specified offset to encode.

key
String

Key to associate with the object being encoded.

Applies to