aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/Google.Protobuf/Collections/RepeatedField.cs
diff options
context:
space:
mode:
authorPete Warden <pete@petewarden.com>2016-03-09 13:05:15 -0800
committerPete Warden <pete@petewarden.com>2016-03-09 13:05:15 -0800
commitbc2d6c2504b38dda4345e9960948d96102daccc3 (patch)
tree48ad357a166b3bf9715a20714db8c117d8150c41 /csharp/src/Google.Protobuf/Collections/RepeatedField.cs
parentf0c1a8637218a03a083901493c9b3acdb6e5db57 (diff)
parent48ebb29a8ec118bf6b9ee39f6be42b57321c099a (diff)
downloadprotobuf-bc2d6c2504b38dda4345e9960948d96102daccc3.tar.gz
protobuf-bc2d6c2504b38dda4345e9960948d96102daccc3.tar.bz2
protobuf-bc2d6c2504b38dda4345e9960948d96102daccc3.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'csharp/src/Google.Protobuf/Collections/RepeatedField.cs')
-rw-r--r--csharp/src/Google.Protobuf/Collections/RepeatedField.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/csharp/src/Google.Protobuf/Collections/RepeatedField.cs b/csharp/src/Google.Protobuf/Collections/RepeatedField.cs
index 1cde03bc..d1db856c 100644
--- a/csharp/src/Google.Protobuf/Collections/RepeatedField.cs
+++ b/csharp/src/Google.Protobuf/Collections/RepeatedField.cs
@@ -33,6 +33,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
+using System.IO;
using System.Text;
namespace Google.Protobuf.Collections
@@ -474,9 +475,9 @@ namespace Google.Protobuf.Collections
/// </summary>
public override string ToString()
{
- var builder = new StringBuilder();
- JsonFormatter.Default.WriteList(builder, this);
- return builder.ToString();
+ var writer = new StringWriter();
+ JsonFormatter.Default.WriteList(writer, this);
+ return writer.ToString();
}
/// <summary>