Post

TSpectrum<T>.Deserialize

Reads a byte array into spectrum object data members.


Remarks

Turns a byte array made by Serialize back into a spectrum.

The current version of Serialize does not carry some of the more obscure data members, so those are not restored.

Inherited by Spectrum and SpectrumEx.


Syntax

SyntaxDescription
Deserialize(byte[] data)Reads a byte array into spectrum object data members.

Parameters

NameTypeDescription
databyte[]A byte array produced by Serialize.

Example

1
2
3
4
5
using Nova.Data;

Spectrum copy = new Spectrum();
copy.Deserialize(payload);                  // payload from Serialize
Console.WriteLine(copy.ScanNumber + ": " + copy.Count + " points");
This post is licensed under CC BY 4.0 by the author.

Trending Tags