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

Save() public method

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

            SaveInternal(textWriter);
        }

Same methods

JsonValue::Save ( Stream stream ) : 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