System.Json.JsonValue.Save C# (CSharp) Method

Save() public method

public Save ( Stream stream ) : void
stream System.IO.Stream
return void
        public virtual void Save(Stream stream)
        {
            if (stream == null)
            {
                throw new ArgumentNullException(nameof(stream));
            }

            Save(new StreamWriter(stream));
        }

Same methods

JsonValue::Save ( TextWriter textWriter ) : void

Usage Example

Beispiel #1
0
        public void SaveTest()
        {
            JsonValue target = AnyInstance.DefaultJsonValue;

            using (MemoryStream ms = new MemoryStream())
            {
                ExceptionHelper.Throws <InvalidOperationException>(() => target.Save(ms), "Operation not supported on JsonValue instances of 'JsonType.Default' type.");
            }
        }
All Usage Examples Of System.Json.JsonValue::Save