Edit

Share via


NSData.AsStream Method

Definition

Wraps the NSData into System.IO.Stream

public virtual System.IO.Stream AsStream ();
abstract member AsStream : unit -> System.IO.Stream
override this.AsStream : unit -> System.IO.Stream

Returns

Remarks

Call Dispose on the returned Stream to release the reference to this NSData.

void DumpImage (Stream output, UIImage img)
{
    NSData data = img.AsPNG ();
    data.AsStream ().CopyTo (output);
}

Applies to