System.Runtime.Serialization.Json.XmlJsonWriter.WriteValue C# (CSharp) Method

WriteValue() private method

private WriteValue ( Array array ) : void
array System.Array
return void
        private void WriteValue(Array array)
        {
            // This method is called only if WriteValue(object) is called with an array
            // The contract for XmlWriter.WriteValue(object) requires that this object array be written out as a string.
            // E.g. WriteValue(new int[] { 1, 2, 3}) should be equivalent to WriteString("1 2 3").             
            JsonDataType oldDataType = _dataType;
            // Set attribute mode to String because WritePrimitiveValue might write numerical text.
            //  Calls to methods that write numbers can't be mixed with calls that write quoted text unless the attribute mode is explicitly string.            
            _dataType = JsonDataType.String;
            StartText();
            for (int i = 0; i < array.Length; i++)
            {
                if (i != 0)
                {
                    _nodeWriter.WriteText(JsonGlobals.WhitespaceChar);
                }
                WritePrimitiveValue(array.GetValue(i));
            }
            _dataType = oldDataType;
        }

Same methods

XmlJsonWriter::WriteValue ( System.DateTime value ) : void
XmlJsonWriter::WriteValue ( System.Guid value ) : void
XmlJsonWriter::WriteValue ( System.TimeSpan value ) : void
XmlJsonWriter::WriteValue ( UniqueId value ) : void
XmlJsonWriter::WriteValue ( bool value ) : void
XmlJsonWriter::WriteValue ( decimal value ) : void
XmlJsonWriter::WriteValue ( double value ) : void
XmlJsonWriter::WriteValue ( float value ) : void
XmlJsonWriter::WriteValue ( int value ) : void
XmlJsonWriter::WriteValue ( long value ) : void
XmlJsonWriter::WriteValue ( object value ) : void
XmlJsonWriter::WriteValue ( string value ) : void
XmlJsonWriter::WriteValue ( ulong value ) : void