diff options
Diffstat (limited to 'src/ProtocolBuffers/AbstractBuilder.cs')
-rw-r--r-- | src/ProtocolBuffers/AbstractBuilder.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ProtocolBuffers/AbstractBuilder.cs b/src/ProtocolBuffers/AbstractBuilder.cs index 47d84a35..e7a41fb3 100644 --- a/src/ProtocolBuffers/AbstractBuilder.cs +++ b/src/ProtocolBuffers/AbstractBuilder.cs @@ -249,5 +249,18 @@ namespace Google.ProtocolBuffers }
#endregion
+
+ /// <summary>
+ /// Converts this builder to a string using <see cref="TextFormat" />.
+ /// </summary>
+ /// <remarks>
+ /// This method is not sealed (in the way that it is in <see cref="AbstractMessage{TMessage, TBuilder}" />
+ /// as it was added after earlier releases; some other implementations may already be overriding the
+ /// method.
+ /// </remarks>
+ public override string ToString()
+ {
+ return TextFormat.PrintToString(this);
+ }
}
}
\ No newline at end of file |